Deleting UI Object fix

This commit is contained in:
Luis Fernando Molina committed 2020-03-26 17:17:04 +01:00
1 parent 8946194346
commit 2d5f03a709
4 files changed
+18 -5

No files matched your search

+5 -1
View File
@@ -279,7 +279,11 @@ function newCircularMenuItem () {
/* A Click during confirmation executes the pre-defined action. */
if (temporaryStatus === STATUS_WAITING_CONFIRMATION || temporaryStatus === STATUS_PRIMARY_WORK_DONE) {
executeAction()
setStatus(thisObject.workDoneLabel, UI_COLOR.PATINATED_TURQUOISE, 100, STATUS_SECONDARY_WORK_DONE)
if (thisObject.workDoneLabel !== undefined) {
setStatus(thisObject.workDoneLabel, UI_COLOR.PATINATED_TURQUOISE, 100, STATUS_SECONDARY_WORK_DONE)
} else {
setStatus('Done', UI_COLOR.PATINATED_TURQUOISE, 100, STATUS_SECONDARY_WORK_DONE)
}
return
}
}
+3 -1
View File
@@ -31,7 +31,9 @@ function newCircularProgressBar () {
function finalize () {
let key = thisObject.payload.node.name + '-' + thisObject.payload.node.type + '-' + thisObject.payload.node.id
systemEventHandler.stopListening(key, eventSubscriptionIdHeartbeat)
if (eventSubscriptionIdHeartbeat !== undefined) {
systemEventHandler.stopListening(key, eventSubscriptionIdHeartbeat)
}
thisObject.container = undefined
thisObject.payload = undefined
+7 -2
View File
@@ -120,8 +120,13 @@ function newUiObject () {
function finalize () {
let key = thisObject.payload.node.name + '-' + thisObject.payload.node.type + '-' + thisObject.payload.node.id
systemEventHandler.stopListening(key, eventSubscriptionIdOnRunning, 'UiObject')
systemEventHandler.stopListening(key, eventSubscriptionIdOnStopped, 'UiObject')
if (eventSubscriptionIdOnRunning !== undefined) {
systemEventHandler.stopListening(key, eventSubscriptionIdOnRunning, 'UiObject')
}
if (eventSubscriptionIdOnStopped !== undefined) {
systemEventHandler.stopListening(key, eventSubscriptionIdOnStopped, 'UiObject')
}
thisObject.container.eventHandler.stopListening(selfFocusEventSubscriptionId)
thisObject.container.eventHandler.stopListening(selfNotFocusEventSubscriptionId)
+3 -1
View File
@@ -44,7 +44,9 @@ function newSystemEventHandler () {
responseWaiters.set(command.callerId, responseCallBack)
}
WEB_SOCKETS_CONNECTION.send(JSON.stringify(command))
if (WEB_SOCKETS_CONNECTION.readyState === 1) { // 1 means connected and ready.
WEB_SOCKETS_CONNECTION.send(JSON.stringify(command))
}
}
function createEventHandler (eventHandlerName, callerId, responseCallBack) {