From 71b3451d0829a682a0261a677b5d01bc10c934d4 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Fri, 12 Aug 2022 22:51:23 -0400 Subject: [PATCH] Remove useless code This removes some useless code that never worked for the Multiple Zone Selector component used for renderWithZones. It was using an element variable that wasn't declare and set that was causing the failure of the entire function (since probably the implementation) the function was call to update the selector with any changes with a zone. but the selector is rebuild anyway at each click on the Add Zone button. It could also update the list by displaying a deleted zone as unkonwn. But this was overkill, in addition that it has never worked without causing any real issues. At least now, it will stop to cause error like this: [DEBUG] [qml] [FlickableWebViewCore.qml] Web Entity JS message: file:///C:/Program%20Files/Overte%20-%20PR146/scripts/system/create/entityProperties/html/js/entityProperties.js 3988 Uncaught ReferenceError: element is not defined --- .../html/js/entityProperties.js | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/scripts/system/create/entityProperties/html/js/entityProperties.js b/scripts/system/create/entityProperties/html/js/entityProperties.js index 3b8f218ff3..5038d3dce5 100644 --- a/scripts/system/create/entityProperties/html/js/entityProperties.js +++ b/scripts/system/create/entityProperties/html/js/entityProperties.js @@ -3973,30 +3973,6 @@ function setZonesSelectionData(element, isEditable) { displaySelectedZones(element.id, isEditable); } -function updateAllZoneSelect() { - let allZoneSelects = document.querySelectorAll(".zoneSelectList"); - let i, j, name, propId, btnList; - for (i = 0; i < allZoneSelects.length; i++) { - btnList = ""; - for (j = 0; j < zonesList.length; j++) { - if (zonesList[j].name === "") { - name = zonesList[j].id; - } else { - name = zonesList[j].name; - } - btnList += "
"; - } - allZoneSelects[i].innerHTML = btnList; - propId = allZoneSelects[i].id.replace("zones-select-", ""); - if (document.getElementById("multiZoneSelTools-" + propId).style.display === "block") { - displaySelectedZones(propId, true); - } else { - displaySelectedZones(propId, false); - } - } -} - /** * MATERIAL TARGET FUNCTIONS */ @@ -4741,7 +4717,6 @@ function loaded() { } } else if (data.type === 'zoneListRequest') { zonesList = data.zones; - updateAllZoneSelect(); } });