mirror of
https://github.com/overte-org/overte.git
synced 2025-04-10 17:22:25 +02:00
Minor Code Adjustments
Minor Code Adjustments
This commit is contained in:
parent
15924f9547
commit
bcebf36261
1 changed files with 8 additions and 8 deletions
|
@ -712,7 +712,7 @@ SelectionManager = (function() {
|
|||
function getTopParent(id) {
|
||||
var topParentId = Uuid.NULL;
|
||||
var properties = Entities.getEntityProperties(id, ['parentID']);
|
||||
if(properties.parentID === Uuid.NULL) {
|
||||
if (properties.parentID === Uuid.NULL) {
|
||||
topParentId = id;
|
||||
} else {
|
||||
topParentId = getTopParent(properties.parentID);
|
||||
|
@ -723,22 +723,22 @@ SelectionManager = (function() {
|
|||
that.addChildrenToSelection = function() {
|
||||
if (that.hasSelection()) {
|
||||
for (var i = 0; i < that.selections.length; i++) {
|
||||
var childrenIds = Entities.getChildrenIDs(that.selections[i]);
|
||||
var childrenIDs = Entities.getChildrenIDs(that.selections[i]);
|
||||
var collectNewChildren;
|
||||
var j;
|
||||
var k = 0;
|
||||
do {
|
||||
collectNewChildren = Entities.getChildrenIDs(childrenIds[k]);
|
||||
collectNewChildren = Entities.getChildrenIDs(childrenIDs[k]);
|
||||
if (collectNewChildren.length > 0) {
|
||||
for (j = 0; j < collectNewChildren.length; j++) {
|
||||
childrenIds.push(collectNewChildren[j]);
|
||||
childrenIDs.push(collectNewChildren[j]);
|
||||
}
|
||||
}
|
||||
k++;
|
||||
} while (k < childrenIds.length);
|
||||
if (childrenIds.length > 0) {
|
||||
for (j = 0; j < childrenIds.length; j++) {
|
||||
that.selections.push(childrenIds[j]);
|
||||
} while (k < childrenIDs.length);
|
||||
if (childrenIDs.length > 0) {
|
||||
for (j = 0; j < childrenIDs.length; j++) {
|
||||
that.selections.push(childrenIDs[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue