REmoving Controls

This commit is contained in:
Luis Fernando Molina committed 2019-04-30 15:21:51 +02:00
1 parent 9e13ec47c4
commit 8e2436d5de
2 files changed
+22 -5

No files matched your search

+18 -5
View File
@@ -54,12 +54,25 @@ function newBottomSpace () {
}
function destroyControl (pControlHandle) {
for (let i = 0; i < thisObject.controls.length; i++) {
let control = thisObject.controls[i]
thisObject.controls = controlsMap.get('Global')
if (thisObject.controls !== undefined) {
for (let i = 0; i < thisObject.controls.length; i++) {
let control = thisObject.controls[i]
if (control.handle === pControlHandle) {
thisObject.controls.splice(i, 1) // Delete item from array.
return
}
}
}
if (control.handle === pControlHandle) {
thisObject.controls.splice(i, 1) // Delete item from array.
return
thisObject.controls = controlsMap.get(window.CHART_ON_FOCUS)
if (thisObject.controls !== undefined) {
for (let i = 0; i < thisObject.controls.length; i++) {
let control = thisObject.controls[i]
if (control.handle === pControlHandle) {
thisObject.controls.splice(i, 1) // Delete item from array.
return
}
}
}
}
+4
View File
@@ -76,6 +76,10 @@ function newPanelsSpace () {
let panel = thisObject.panels[i]
if (panel.handle === pPanelHandle) {
if (panel.finalize !== undefined) {
panel.finalize()
}
thisObject.panels.splice(i, 1) // Delete item from array.
return
}