From 866691306551a322fabe60879cf16cea35d4e5cb Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Fri, 10 Jan 2020 15:00:35 +0100 Subject: [PATCH] Bug Fixed while dragging --- Canvas.js | 21 ++++++++++----------- Scales/RateScale.js | 2 +- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Canvas.js b/Canvas.js index b7f51fbbc..ac164db12 100644 --- a/Canvas.js +++ b/Canvas.js @@ -663,8 +663,12 @@ function newCanvas () { function onMouseOver (event) { try { - /* Then we check who is the current object underneeth the mounse. */ + if (containerDragStarted === true) { + containerBeingDragged.eventHandler.raiseEvent('onMouseOver', event) + return + } + /* Then we check who is the current object underneeth the mounse. */ let point = { x: event.pageX, y: event.pageY - CURRENT_TOP_MARGIN @@ -672,8 +676,7 @@ function newCanvas () { let container - /* We check if the mouse is over an element of the Strategy Space / */ - + /* We check if the mouse is over an element of the Strategy Space / */ if (thisObject.designerSpace !== undefined) { container = thisObject.designerSpace.getContainer(point) @@ -683,8 +686,7 @@ function newCanvas () { } } - /* We check if the mouse is over an element of the Top Space / */ - + /* We check if the mouse is over an element of the Top Space / */ if (thisObject.topSpace !== undefined) { container = thisObject.topSpace.getContainer(point) @@ -694,8 +696,7 @@ function newCanvas () { } } - /* We check if the mouse is over an element of the CockpitSpace / */ - + /* We check if the mouse is over an element of the CockpitSpace / */ if (thisObject.cockpitSpace !== undefined) { container = thisObject.cockpitSpace.getContainer(point) @@ -705,8 +706,7 @@ function newCanvas () { } } - /* We check if the mouse is over a panel/ */ - + /* We check if the mouse is over a panel/ */ if (thisObject.panelsSpace !== undefined) { container = thisObject.panelsSpace.getContainer(point) @@ -716,8 +716,7 @@ function newCanvas () { } } - /* If it is not, then we check if it is over any of the existing containers at the Chart Space. */ - + /* If it is not, then we check if it is over any of the existing containers at the Chart Space. */ if (thisObject.chartSpace !== undefined) { container = thisObject.chartSpace.getContainer(point, GET_CONTAINER_PURPOSE.MOUSE_OVER) diff --git a/Scales/RateScale.js b/Scales/RateScale.js index 5f81177b6..5be5a908d 100644 --- a/Scales/RateScale.js +++ b/Scales/RateScale.js @@ -105,7 +105,7 @@ function newRateScale () { delta = event.wheelDelta if (delta < 0) { thisObject.heightPercentage = thisObject.heightPercentage - STEP_SIZE - if (thisObject.heightPercentage < STEP_SIZE) { thisObject.heightPercentage = STEP_SIZE } + if (thisObject.heightPercentage < STEP_SIZE * 3) { thisObject.heightPercentage = STEP_SIZE } } else { thisObject.heightPercentage = thisObject.heightPercentage + STEP_SIZE if (thisObject.heightPercentage > 150) { thisObject.heightPercentage = 200 }