From fba71490a897906b8bd782ab2a48ed0517070386 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Fri, 28 Feb 2020 19:06:10 +0100 Subject: [PATCH] Bug fixed with tab button --- Canvas.js | 14 +++++++++----- Panels/LayersPanel.js | 2 +- Panels/PanelTabButton.js | 12 ++---------- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/Canvas.js b/Canvas.js index c8821179e..a0a5b6ad4 100644 --- a/Canvas.js +++ b/Canvas.js @@ -550,11 +550,15 @@ function newCanvas () { container = thisObject.panelsSpace.getContainer(point) - if (container !== undefined && container.isDraggeable === true && event.shiftKey === false) { - containerBeingDragged = container - containerDragStarted = true - containerBeingDragged.eventHandler.raiseEvent('onDragStarted', point) - return + if (container !== undefined && event.shiftKey === false) { + if (container.isDraggeable === true) { + containerBeingDragged = container + containerDragStarted = true + containerBeingDragged.eventHandler.raiseEvent('onDragStarted', point) + return + } else { + return + } } if (container !== undefined && container.isClickeable === true) { diff --git a/Panels/LayersPanel.js b/Panels/LayersPanel.js index b95821ad7..258c9d8b7 100644 --- a/Panels/LayersPanel.js +++ b/Panels/LayersPanel.js @@ -174,7 +174,7 @@ function newLayersPanel () { function onMouseOver (event) { isMouseOver = true - mouseOverCounter = 100 + mouseOverCounter = 150 } function onMouseWheel (event) { diff --git a/Panels/PanelTabButton.js b/Panels/PanelTabButton.js index 2d4b37565..38de1b23c 100644 --- a/Panels/PanelTabButton.js +++ b/Panels/PanelTabButton.js @@ -19,6 +19,7 @@ function newPanelTabButton () { thisObject.container.name = 'Panel Tab Button' thisObject.container.initialize() thisObject.container.isClickeable = true + thisObject.container.isDraggeable = false thisObject.container.frame.containerName = 'Panel Tab Button' /* Animation to hide the pannel */ @@ -127,19 +128,10 @@ function newPanelTabButton () { drawButton() } - function getContainer (point) { + function getContainer (point, purpose) { let container - - /* First we check if thisObject point is inside thisObject space. */ - if (thisObject.container.frame.isThisPointHere(point, true) === true) { - /* Now we see which is the inner most container that has it */ - return thisObject.container - } else { - /* This point does not belong to thisObject space. */ - - return undefined } }