mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 19:41:20 +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) {
|
function getTopParent(id) {
|
||||||
var topParentId = Uuid.NULL;
|
var topParentId = Uuid.NULL;
|
||||||
var properties = Entities.getEntityProperties(id, ['parentID']);
|
var properties = Entities.getEntityProperties(id, ['parentID']);
|
||||||
if(properties.parentID === Uuid.NULL) {
|
if (properties.parentID === Uuid.NULL) {
|
||||||
topParentId = id;
|
topParentId = id;
|
||||||
} else {
|
} else {
|
||||||
topParentId = getTopParent(properties.parentID);
|
topParentId = getTopParent(properties.parentID);
|
||||||
|
@ -723,22 +723,22 @@ SelectionManager = (function() {
|
||||||
that.addChildrenToSelection = function() {
|
that.addChildrenToSelection = function() {
|
||||||
if (that.hasSelection()) {
|
if (that.hasSelection()) {
|
||||||
for (var i = 0; i < that.selections.length; i++) {
|
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 collectNewChildren;
|
||||||
var j;
|
var j;
|
||||||
var k = 0;
|
var k = 0;
|
||||||
do {
|
do {
|
||||||
collectNewChildren = Entities.getChildrenIDs(childrenIds[k]);
|
collectNewChildren = Entities.getChildrenIDs(childrenIDs[k]);
|
||||||
if (collectNewChildren.length > 0) {
|
if (collectNewChildren.length > 0) {
|
||||||
for (j = 0; j < collectNewChildren.length; j++) {
|
for (j = 0; j < collectNewChildren.length; j++) {
|
||||||
childrenIds.push(collectNewChildren[j]);
|
childrenIDs.push(collectNewChildren[j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
k++;
|
k++;
|
||||||
} while (k < childrenIds.length);
|
} while (k < childrenIDs.length);
|
||||||
if (childrenIds.length > 0) {
|
if (childrenIDs.length > 0) {
|
||||||
for (j = 0; j < childrenIds.length; j++) {
|
for (j = 0; j < childrenIDs.length; j++) {
|
||||||
that.selections.push(childrenIds[j]);
|
that.selections.push(childrenIDs[j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue