diff --git a/scripts/system/create/modules/renderWithZonesManager.html b/scripts/system/create/modules/renderWithZonesManager.html index afc6627232f..03dd4601599 100644 --- a/scripts/system/create/modules/renderWithZonesManager.html +++ b/scripts/system/create/modules/renderWithZonesManager.html @@ -91,6 +91,13 @@ td.lineInverted { color: #000000; } + div.warning { + color: #ff5900; + padding: 2px; + margin: 3px; + font-family: Raleway-Regular; + font-size: 12px; + } a { font-size: 22px; font-weight: 500; diff --git a/scripts/system/create/modules/renderWithZonesManager.js b/scripts/system/create/modules/renderWithZonesManager.js index ee1ec1d2631..49dec2bdf34 100644 --- a/scripts/system/create/modules/renderWithZonesManager.js +++ b/scripts/system/create/modules/renderWithZonesManager.js @@ -24,6 +24,9 @@ const RWZ_ZONE_SCAN_RADIUS = 27713; //maximal radius to cover the entire domain. let rwzmOverlayWebWindow = null; function renderWithZonesManager(entityIDs, highlightedID = "") { + if (rwzmGetCheckSum(entityIDs) !== rwzmGetCheckSum(rwzmSelectedId)) { + rwzmUndo = []; + } rwzmSelectedId = entityIDs; if (entityIDs.length === 0) { audioFeedback.rejection(); @@ -75,6 +78,16 @@ function renderWithZonesManager(entityIDs, highlightedID = "") { rwzmGenerateUI(highlightedID); } + +function rwzmGetCheckSum(array) { + let i = 0; + let sum = 0; + let strForm = JSON.stringify(array); + for (i = 0; i < strForm.length; i++) { + sum = sum + strForm.charCodeAt(i); + } + return sum; +} function uiHasClosed() { rwzmOverlayWebWindow.closed.disconnect(uiHasClosed); rwzmOverlayWebWindow.webEventReceived.disconnect(webEventReceiver); @@ -96,6 +109,7 @@ function rwzmGenerateUI(highlightedID) { let addAction = ""; let toHighlight = ""; let viewBtnCaption = ""; + let warning = false; uiContent = uiContent + '

RenderWithZones Manager


\n'; if (canUnlock) { if (enforceLocked) { @@ -123,6 +137,7 @@ function rwzmGenerateUI(highlightedID) { if (name === "") { name = rwzmGenerateUnidentifiedZoneName(rwzmUsedZonesList[i]); elementClass = "errorline"; + warning = true; } toHighlight = rwzmUsedZonesList[i]; viewBtnCaption = "View"; @@ -201,6 +216,9 @@ function rwzmGenerateUI(highlightedID) { uiContent = uiContent + ' \n'; uiContent = uiContent + ' \n'; uiContent = uiContent + ' \n'; + if (warning) { + uiContent = uiContent + '
WARNING: The "ZONE NOT FOUND" visibility zones might simply not be loaded if too far and small. Please, verify before.
\n'; + } //Zone selector Add uiContent = uiContent + '
\n'; uiContent = uiContent + '

Select the zone to add:

\n';