BUG FIXed: Resize event implemented on chart space

This commit is contained in:
Luis Fernando Molina committed 2019-05-20 12:14:33 +02:00
1 parent b9cd4979ce
commit 58e1fca188
1 file changed
+11
+11
View File
@@ -32,6 +32,8 @@ function newChartSpace () {
thisObject.container.isDraggeable = false
thisObject.container.isWheelable = false
let canvasBrowserResizedEventSubscriptionId
return thisObject
function finalize () {
@@ -40,6 +42,8 @@ function newChartSpace () {
timeMachine.finalize()
}
thisObject.container.eventHandler.stopListening(canvasBrowserResizedEventSubscriptionId)
thisObject.container.finalize()
thisObject.container = undefined
}
@@ -48,6 +52,8 @@ function newChartSpace () {
let initializedCounter = 0
let toInitialize = 1
canvasBrowserResizedEventSubscriptionId = window.canvasApp.eventHandler.listenToEvent('Browser Resized', resize)
/* We create the first of many possible time machines that could live at the Chart Space. */
let timeMachine = newTimeMachine()
@@ -101,6 +107,11 @@ function newChartSpace () {
}
}
function resize () {
thisObject.container.frame.width = browserCanvas.width
thisObject.container.frame.height = COCKPIT_SPACE_POSITION
}
function fitIntoVisibleArea (point) {
/* Here we check the boundaries of the resulting points, so they dont go out of the visible area. */