Skip to content
Snippets Groups Projects
Commit 98337097 authored by Maximilian Giller's avatar Maximilian Giller :squid:
Browse files

Generalized isActive Property to all tools

parent 4f6b3470
No related branches found
No related tags found
No related merge requests found
Pipeline #52773 passed
......@@ -19,14 +19,6 @@ export default class DeleteTool extends Tool {
}
}
onToolActivate() {
this.isActive = true;
}
onToolDeactivate(nextTool) {
this.isActive = false;
}
onBoxSelect(left, bottom, top, right) {
// Filter out selected nodes
const hitNodes = [];
......
......@@ -6,6 +6,7 @@ export default class Tool {
this.warnings = false;
this.menu = menu;
this.toggleBehaviour = toggleBehaviour;
this.isActive = false;
if (this.menu !== undefined) {
this.menu.loadTool(this);
......@@ -31,6 +32,7 @@ export default class Tool {
}
activateTool() {
this.isActive = true;
if (this.menu !== undefined) {
this.menu.show();
}
......@@ -39,6 +41,7 @@ export default class Tool {
}
deactivateTool(nextTool) {
this.isActive = false;
this.onToolDeactivate(nextTool);
if (this.menu !== undefined) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment