Finalize for Container

This commit is contained in:
Luis Fernando Molina committed 2019-04-23 22:25:48 +02:00
1 parent 7dd3d6c15c
commit 9863485e91
2 files changed
+12

No files matched your search

+11
View File
@@ -10,15 +10,25 @@ function newContainer () {
isWheelable: false,
name: undefined,
initialize: initialize,
finalize: finalize,
connectToParent: connectToParent,
isForThisPurpose: isForThisPurpose
}
let connectedToParentWidth = false
let connectedToParentHeight = false
let isConnectedToParent = false
return thisObject
function finalize () {
if (isConnectedToParent === true) {
thisObject.parentContainer.eventHandler.stopListening('Dimmensions Changed', onParentDimmensionsChanged)
thisObject.parentContainer.eventHandler.stopListening('onMouseOver', onMouseOver)
thisObject.parentContainer.eventHandler.stopListening('onMouseNotOver', onMouseNotOver)
}
}
function initialize (pName) {
thisObject.name = pName
@@ -39,6 +49,7 @@ function newContainer () {
function connectToParent (parentContainer, onWidth, onHeight) {
connectedToParentWidth = onWidth
connectedToParentHeight = onHeight
isConnectedToParent = true
thisObject.displacement.parentDisplacement = parentContainer.displacement
thisObject.frame.parentFrame = parentContainer.frame
+1
View File
@@ -619,6 +619,7 @@ function newPlottersManager () {
productPlotters[i].storage.finalize()
if (productPlotters[i].plotter.finalize !== undefined) {
productPlotters[i].plotter.container.finalize()
productPlotters[i].plotter.finalize()
}