refactoring onMouseWheel

This commit is contained in:
Luis Fernando Molina committed 2019-05-05 15:45:58 +02:00
1 parent fbba9b217e
commit 9b295b8aad
6 files changed
+10 -10

No files matched your search

+4 -4
View File
@@ -640,7 +640,7 @@ function newCanvas () {
container = canvas.panelsSpace.getContainer({ x: point.x, y: point.y })
if (container !== undefined && container.isWheelable === true) {
container.eventHandler.raiseEvent('Mouse Wheel', event)
container.eventHandler.raiseEvent('onMouseWheel', event)
return false // This instructs the browser not to take the event and scroll the page.
}
@@ -649,7 +649,7 @@ function newCanvas () {
container = canvas.floatingSpace.getContainer({ x: point.x, y: point.y })
if (container !== undefined && container.isWheelable === true) {
container.eventHandler.raiseEvent('Mouse Wheel', event)
container.eventHandler.raiseEvent('onMouseWheel', event)
return false // This instructs the browser not to take the event and scroll the page.
}
@@ -658,7 +658,7 @@ function newCanvas () {
container = canvas.bottomSpace.getContainer({ x: point.x, y: point.y })
if (container !== undefined && container.isWheelable === true) {
container.eventHandler.raiseEvent('Mouse Wheel', event)
container.eventHandler.raiseEvent('onMouseWheel', event)
return false // This instructs the browser not to take the event and scroll the page.
}
@@ -667,7 +667,7 @@ function newCanvas () {
container = canvas.chartSpace.getContainer({ x: point.x, y: point.y }, GET_CONTAINER_PURPOSE.MOUSE_WHEEL)
if (container !== undefined && container.isWheelable === true) {
container.eventHandler.raiseEvent('Mouse Wheel', event)
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 */
+2 -2
View File
@@ -132,13 +132,13 @@
/* Listen to Status Changes Events */
productCard.container.eventHandler.listenToEvent('Status Changed', onProductCardStatusChanged)
productCard.container.eventHandler.listenToEvent('Mouse Wheel', onMouseWheel)
productCard.container.eventHandler.listenToEvent('onMouseWheel', onMouseWheel)
}
}
}
}
thisObject.container.eventHandler.listenToEvent('Mouse Wheel', onMouseWheel)
thisObject.container.eventHandler.listenToEvent('onMouseWheel', onMouseWheel)
isInitialized = true
}
+1 -1
View File
@@ -41,7 +41,7 @@ function newRateScale () {
function initialize (pTimeLineCoordinateSystem) {
timeLineCoordinateSystem = pTimeLineCoordinateSystem
thisObject.container.eventHandler.listenToEvent('Mouse Wheel', onMouseWheel)
thisObject.container.eventHandler.listenToEvent('onMouseWheel', onMouseWheel)
thisObject.heightPercentage = window.localStorage.getItem(MODULE_NAME)
if (!thisObject.heightPercentage) {
+1 -1
View File
@@ -40,7 +40,7 @@ function newTimePeriodScale () {
function initialize (pTimeLineCoordinateSystem) {
timeLineCoordinateSystem = pTimeLineCoordinateSystem
thisObject.container.eventHandler.listenToEvent('Mouse Wheel', onMouseWheel)
thisObject.container.eventHandler.listenToEvent('onMouseWheel', onMouseWheel)
readObjectState()
newTimePeriod()
+1 -1
View File
@@ -35,7 +35,7 @@ function newTimeScale () {
function initialize (pTimeLineCoordinateSystem) {
timeLineCoordinateSystem = pTimeLineCoordinateSystem
thisObject.container.eventHandler.listenToEvent('Mouse Wheel', onMouseWheel)
thisObject.container.eventHandler.listenToEvent('onMouseWheel', onMouseWheel)
thisObject.lenghtPercentage = window.localStorage.getItem(MODULE_NAME)
if (!thisObject.lenghtPercentage) {
+1 -1
View File
@@ -55,7 +55,7 @@ function newFloatingSpace () {
thisObject.strategyParts = newStrategyParts()
thisObject.strategyParts.initialize(thisObject.floatingLayer)
thisObject.container.eventHandler.listenToEvent('Mouse Wheel', onMouseWheel)
thisObject.container.eventHandler.listenToEvent('onMouseWheel', onMouseWheel)
}
function onMouseWheel (event) {