Minor Code Adjustments

Minor Code Adjustments
This commit is contained in:
Alezia Kurdis 2020-10-24 13:19:09 -04:00 committed by GitHub
parent 15924f9547
commit bcebf36261
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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]);
} }
} }
} }