bug fixed layers turning off

This commit is contained in:
Luis Fernando Molina committed 2020-03-11 08:54:47 +01:00
1 parent bb4114df8b
commit ec052d2e94
2 files changed
+15 -1

No files matched your search

+12
View File
@@ -20,6 +20,7 @@ function newLayer () {
plotterTypeIcon: undefined,
baseAssetIcon: undefined,
quotedAssetIcon: undefined,
checkStatusAtShutDown: checkStatusAtShutDown,
physics: physics,
draw: draw,
turnOff: turnOff,
@@ -230,6 +231,17 @@ function newLayer () {
}
}
function checkStatusAtShutDown () {
/* Mechanism to recover a layer that was left loading the last time the browser was shut dowm. */
let storedValue = loadPropertyFromNodeConfig(thisObject.payload, 'status')
if (storedValue !== undefined) {
if (storedValue === LAYER_STATUS.LOADING) {
resetProgressBars()
changeStatusTo(LAYER_STATUS.LOADING)
}
}
}
function getContainer (point) {
if (panelsVisibleButton !== undefined) {
let container = panelsVisibleButton.getContainer(point)
+3 -1
View File
@@ -163,7 +163,9 @@ function newLayersPanel () {
layer.onLayerStatusChangedEventSuscriptionId = layer.container.eventHandler.listenToEvent('Status Changed', onLayerStatusChanged)
layer.onMouseWheelEventSuscriptionId = layer.container.eventHandler.listenToEvent('onMouseWheel', onMouseWheel)
return layer
layer.checkStatusAtShutDown()
return
}
}
}