Update UiObject.js

This commit is contained in:
Luis Fernando Molina committed 2020-07-16 12:21:51 +02:00
1 parent 1bb17586c9
commit ae0f1c6f7f
1 file changed
+1
+1
View File
@@ -646,6 +646,7 @@ function newUiObject () {
if (isDragging !== true) { return }
if (thisObject.payload.floatingObject.isFrozen === true) { return }
if (rightDragging === false) { return }
if (thisObject.payload === undefined) { return }
if (thisObject.payload.referenceParent === undefined) { return }
let distanceToReferenceParent = Math.sqrt(Math.pow(thisObject.payload.position.x - thisObject.payload.referenceParent.payload.position.x, 2) + Math.pow(thisObject.payload.position.y - thisObject.payload.referenceParent.payload.position.y, 2))