mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Refactor
This commit is contained in:
parent
f27e363b68
commit
4a96dc2fdc
1 changed files with 6 additions and 6 deletions
|
@ -140,22 +140,22 @@ SelectionManager = (function() {
|
|||
that._update(true);
|
||||
};
|
||||
|
||||
that.removeEntity = function(entityID) {
|
||||
function removeEntityByID(entityID) {
|
||||
var idx = that.selections.indexOf(entityID);
|
||||
if (idx >= 0) {
|
||||
that.selections.splice(idx, 1);
|
||||
Selection.removeFromSelectedItemsList(HIGHLIGHT_LIST_NAME, "entity", entityID);
|
||||
}
|
||||
}
|
||||
|
||||
that.removeEntity = function (entityID) {
|
||||
removeEntityByID(entityID);
|
||||
that._update(true);
|
||||
};
|
||||
|
||||
that.removeEntities = function (entityIDs) {
|
||||
for (var i = 0, length = entityIDs.length; i < length; i++) {
|
||||
var idx = that.selections.indexOf(entityIDs[i]);
|
||||
if (idx >= 0) {
|
||||
that.selections.splice(idx, 1);
|
||||
Selection.removeFromSelectedItemsList(HIGHLIGHT_LIST_NAME, "entity", entityIDs[i]);
|
||||
}
|
||||
removeEntityByID(entityIDs[i]);
|
||||
}
|
||||
that._update(true);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue