mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-10 02:13:58 +01:00
deselectAll on craft event
This commit is contained in:
parent
ac7f52325f
commit
a55c2d7768
1 changed files with 9 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ class AbstractSelectionManager {
|
|||
constructor(viewer) {
|
||||
this.viewer = viewer;
|
||||
this.selection = [];
|
||||
this.viewer.bus.subscribe('craft', () => this.deselectAll());
|
||||
}
|
||||
|
||||
contains(face) {
|
||||
|
|
@ -22,6 +23,10 @@ class AbstractSelectionManager {
|
|||
select() {
|
||||
throw "AbstractFunctionCall";
|
||||
}
|
||||
|
||||
deselectAll() {
|
||||
throw "AbstractFunctionCall";
|
||||
}
|
||||
}
|
||||
|
||||
export class SketchSelectionManager extends AbstractSelectionManager {
|
||||
|
|
@ -40,6 +45,10 @@ export class SketchSelectionManager extends AbstractSelectionManager {
|
|||
this.notify();
|
||||
this.viewer.render();
|
||||
}
|
||||
|
||||
deselectAll() {
|
||||
this.clear();
|
||||
}
|
||||
|
||||
clear() {
|
||||
this._clearSilent();
|
||||
|
|
|
|||
Loading…
Reference in a new issue