diff --git a/Canvas.js b/Canvas.js index a0a5b6ad4..f111d7c0f 100644 --- a/Canvas.js +++ b/Canvas.js @@ -548,7 +548,7 @@ function newCanvas () { /* We check if the mouse is over a panel/ */ - container = thisObject.panelsSpace.getContainer(point) + container = thisObject.panelsSpace.getContainer(point, GET_CONTAINER_PURPOSE.DRAGGING) if (container !== undefined && event.shiftKey === false) { if (container.isDraggeable === true) { @@ -645,7 +645,7 @@ function newCanvas () { /* We check if the mouse is over a panel/ */ - container = thisObject.panelsSpace.getContainer(point) + container = thisObject.panelsSpace.getContainer(point, GET_CONTAINER_PURPOSE.MOUSE_CLICK) if (container !== undefined && container.isClickeable === true) { container.eventHandler.raiseEvent('onMouseClick', point) diff --git a/Panels/LayersPanel.js b/Panels/LayersPanel.js index 258c9d8b7..b5d89fbc7 100644 --- a/Panels/LayersPanel.js +++ b/Panels/LayersPanel.js @@ -272,7 +272,7 @@ function newLayersPanel () { checkPoint = thisObject.fitFunction(checkPoint) if (point.x === checkPoint.x && point.y === checkPoint.y) { - if (container.isForThisPurpose(purpose)) { + if (purpose !== GET_CONTAINER_PURPOSE.MOUSE_OVER) { return container } }