mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Fix for Issue 869
This excludes the local and avatar entities from what is returns by Entities.getChildrenIDs to avoid the selection tools of the Zone entities to be considered as Children of it. This was necessary for the display of the hierarchy status, but also for the "Add Children to Selection".
This commit is contained in:
parent
4c8d8e1b3a
commit
031b3985b0
1 changed files with 14 additions and 1 deletions
|
@ -2908,7 +2908,7 @@ function zoneSortOrder(a, b) {
|
|||
function getParentState(id) {
|
||||
var state = "NONE";
|
||||
var properties = Entities.getEntityProperties(id, ["parentID"]);
|
||||
var children = Entities.getChildrenIDs(id);
|
||||
var children = getDomainOnlyChildrenIDs(id);
|
||||
if (properties.parentID !== Uuid.NULL) {
|
||||
if (children.length > 0) {
|
||||
state = "PARENT_CHILDREN";
|
||||
|
@ -2923,4 +2923,17 @@ function getParentState(id) {
|
|||
return state;
|
||||
}
|
||||
|
||||
function getDomainOnlyChildrenIDs(id) {
|
||||
var allChildren = Entities.getChildrenIDs(id);
|
||||
var domainOnlyChildren = [];
|
||||
var properties;
|
||||
for (var i = 0; i < allChildren.length; i++) {
|
||||
properties = Entities.getEntityProperties(allChildren[i], ["entityHostType"]);
|
||||
if (properties.entityHostType == "domain") {
|
||||
domainOnlyChildren.push(allChildren[i]);
|
||||
}
|
||||
}
|
||||
return domainOnlyChildren;
|
||||
}
|
||||
|
||||
}()); // END LOCAL_SCOPE
|
||||
|
|
Loading…
Reference in a new issue