zooms at the charts working again

This commit is contained in:
Luis Fernando Molina committed 2019-05-10 14:48:34 +02:00
1 parent 16fb5edd0a
commit 8a4849e4b1
2 files changed
+8 -5

No files matched your search

+7 -5
View File
@@ -673,6 +673,11 @@ function newCanvas () {
return false // This instructs the browser not to take the event and scroll the page.
}
if (container !== undefined) {
viewPort.applyZoom(delta)
return false
}
/* We try second with floating objects. */
container = canvas.floatingSpace.getContainer({ x: point.x, y: point.y })
@@ -680,12 +685,9 @@ function newCanvas () {
if (container !== undefined && container.isWheelable === true) {
container.eventHandler.raiseEvent('onMouseWheel', event)
return false // This instructs the browser not to take the event and scroll the page.
} else {
/* If all the above fails, we fallback into applying zoom to the viewPort */
viewPort.applyZoom(delta)
return false // This instructs the browser not to take the event and scroll the page.
}
return false
} catch (err) {
if (ERROR_LOG === true) { logger.write('[ERROR] onMouseWheel -> err = ' + err.stack) }
}
+1
View File
@@ -30,6 +30,7 @@ function newChartSpace () {
thisObject.container.initialize(MODULE_NAME)
thisObject.container.isDraggeable = false
thisObject.container.isWheelable = false
return thisObject