diff --git a/templates/ui/utils/setchildreninteractive/ContainsPoint.js b/templates/ui/utils/setchildreninteractive/ContainsPoint.js index 66c519f84f..bc69f93e9e 100644 --- a/templates/ui/utils/setchildreninteractive/ContainsPoint.js +++ b/templates/ui/utils/setchildreninteractive/ContainsPoint.js @@ -1,6 +1,6 @@ import ContainsPointTest from '../ContainsPoint.js'; -var ContainsPoint = function (gameObjects, x, y, targetMode) { +var ContainsPoint = function (targetMode, gameObjects, x, y) { if (targetMode === 'parent') { var parent; for (var i = 0, cnt = gameObjects.length; i < cnt; i++) { diff --git a/templates/ui/utils/setchildreninteractive/EmitChildEvent.js b/templates/ui/utils/setchildreninteractive/EmitChildEvent.js index 6ca0380a80..82951a5ed4 100644 --- a/templates/ui/utils/setchildreninteractive/EmitChildEvent.js +++ b/templates/ui/utils/setchildreninteractive/EmitChildEvent.js @@ -12,7 +12,7 @@ var EmitChildEvent = function (eventEmitter, eventName, targets, targetMode, wor var camera = pointer.camera; var px = worldX + camera.scrollX * (firstChild.scrollFactorX - 1); var py = worldY + camera.scrollY * (firstChild.scrollFactorY - 1); - child = ContainsPoint(targets, px, py, targetMode); + child = ContainsPoint(targetMode, targets, px, py); } if (!child) { diff --git a/templates/ui/utils/setchildreninteractive/OverChild.js b/templates/ui/utils/setchildreninteractive/OverChild.js index bda708df25..921e27ee04 100644 --- a/templates/ui/utils/setchildreninteractive/OverChild.js +++ b/templates/ui/utils/setchildreninteractive/OverChild.js @@ -27,7 +27,7 @@ var OnMove = function (pointer, localX, localY, event) { var px = pointer.worldX + camera.scrollX * (firstChild.scrollFactorX - 1); var py = pointer.worldY + camera.scrollY * (firstChild.scrollFactorY - 1); - var child = ContainsPoint(childrenInteractive.targetSizers, px, py, childrenInteractive.targetMode); + var child = ContainsPoint(childrenInteractive.targetMode, childrenInteractive.targetSizers, px, py); var preChild = childrenInteractive.lastOverChild; if (child && preChild && (child === preChild)) {