From e8a5204a31062d45e1531288461541884c7a4d4b Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Thu, 23 May 2019 12:55:04 +0200 Subject: [PATCH] Last bug from detaching corrected --- FloatingSpace/StrategyPart.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/FloatingSpace/StrategyPart.js b/FloatingSpace/StrategyPart.js index 5d2e35c6b..664ec9fc8 100644 --- a/FloatingSpace/StrategyPart.js +++ b/FloatingSpace/StrategyPart.js @@ -169,7 +169,7 @@ function newStrategyPart () { attacchingCounters() if (thisObject.isOnFocus !== true) { return } - if (thisObject.isDragging !== true) { return } + if (isDragging !== true) { return } if (thisObject.payload.chainParent !== undefined) { return } let nearbyFloatingObjects = thisObject.payload.floatingObject.nearbyFloatingObjects @@ -256,7 +256,7 @@ function newStrategyPart () { } function detachingPhysics () { - if (thisObject.isDragging !== true) { return } + if (isDragging !== true) { return } let distanceToChainParent = Math.sqrt(Math.pow(thisObject.payload.position.x - thisObject.payload.targetPosition.x, 2) + Math.pow(thisObject.payload.position.y - thisObject.payload.targetPosition.y, 2)) let ratio = distanceToChainParent / previousDistance @@ -633,4 +633,3 @@ function newStrategyPart () { } } } -