Commit 227dd0bf authored by Christian Winter's avatar Christian Winter

code cleanup

parent fcf3a375
Pipeline #5096775 passed with stage
in 55 seconds
......@@ -83,6 +83,7 @@
addInstance(instance) {
if (this.instances.includes(instance))
return;
this.instances.push(instance);
this._instanceSelectionChanged();
}
......
......@@ -23,6 +23,7 @@
y: Math.max(this.startPos.y, this.currentPos.y)
};
// HACK make own state
// Used for ArtBounds
if (this.artBounds) {
Preferences.artBounds.left = min.x;
......@@ -42,7 +43,6 @@
if (Preferences.selectVertices && Preferences.selectEdges) {
// TODO weird number but should be a third?
let limit = 0.25;
let lines = selectionType ?
Application.currentView.data.lines.concat(Application.currentView.selection.data.partialLines)
: Application.currentView.selection.data.lines.concat(Application.currentView.selection.data.partialLines);
......@@ -99,8 +99,7 @@
if (instance.selectionBoxHit(selectionBounds))
instancesToChangeSelection.push(instance);
for (let instance of instancesToChangeSelection)
{
for (let instance of instancesToChangeSelection) {
Application.currentView.selection.data.addInstance(instance);
Application.currentView.data.removeInstance(instance);
}
......@@ -110,8 +109,7 @@
if (instance.selectionBoxHit(selectionBounds))
instancesToChangeSelection.push(instance);
for (let instance of instancesToChangeSelection)
{
for (let instance of instancesToChangeSelection) {
Application.currentView.data.addInstance(instance);
Application.currentView.selection.data.removeInstance(instance);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment