From 06b4d7e90df893d0cb840ffc603e29b607242e92 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Fri, 14 Mar 2025 21:50:19 -0400 Subject: [PATCH] Requested adjustments for Child Entity List Requested adjustments for Child Entity List --- .../entityProperties/html/js/entityProperties.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/system/create/entityProperties/html/js/entityProperties.js b/scripts/system/create/entityProperties/html/js/entityProperties.js index 4b6542ab9d..80f5b21882 100644 --- a/scripts/system/create/entityProperties/html/js/entityProperties.js +++ b/scripts/system/create/entityProperties/html/js/entityProperties.js @@ -15,6 +15,8 @@ var currentTab = "base"; const DEGREES_TO_RADIANS = Math.PI / 180.0; +const UUID_NONE = "{00000000-0000-0000-0000-000000000000}"; + const ENTITY_HOST_TYPE_COLOR_DOMAIN = "#afafaf"; const ENTITY_HOST_TYPE_COLOR_AVATAR = "#7fdb98"; const ENTITY_HOST_TYPE_COLOR_LOCAL = "#f0d769"; @@ -4843,17 +4845,13 @@ function setChildListData(element, children, parentID, entityHostType = "") { function navigateToSpecificEntityFromParentID() { let parentID = getPropertyInputElement("parentID").value; - if (parentID !== "" && parentID !== "{00000000-0000-0000-0000-000000000000}") { + if (parentID !== "" && parentID !== UUID_NONE) { navigateToSpecificEntity(parentID); } } function setParentIdNavigationAvailable(selectionLength) { - if (selectionLength === 1) { - $('#property-parentID-button-navigateToParentEntity').attr('disabled', false); - } else { - $('#property-parentID-button-navigateToParentEntity').attr('disabled', true); - } + $('#property-parentID-button-navigateToParentEntity').attr('disabled', selectionLength !== 1); } function navigateToSpecificEntity(id) { @@ -5494,7 +5492,7 @@ function handleEntitySelectionUpdate(selections, isPropertiesToolUpdate) { } case 'childList': { let parentID = selections[0].properties.parentID; - if (selections.length !== 1 || parentID === "{00000000-0000-0000-0000-000000000000}") { + if (selections.length !== 1 || parentID === UUID_NONE) { parentID = ""; } setChildListData(property.elInput, propertyValue, parentID, entityHostType);