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

Implemented activate and deactivate events

parent 4d7d8343
No related branches found
No related tags found
No related merge requests found
...@@ -34,9 +34,13 @@ class State extends Tool { ...@@ -34,9 +34,13 @@ class State extends Tool {
return; return;
} }
this.tool.onToolDeactivate(tool);
this.previousTool = this.tool; this.previousTool = this.tool;
this.tool = tool; this.tool = tool;
this.display.setSelectedTool(tool); this.display.setSelectedTool(tool);
this.tool.onToolActivate();
} }
setSelectedItem(item) { setSelectedItem(item) {
......
...@@ -18,6 +18,18 @@ class Tool { ...@@ -18,6 +18,18 @@ class Tool {
return this.icon; return this.icon;
} }
onToolActivate() {
if (this.warnings) {
console.warn('Method "onToolActivate" not implemented.');
}
}
onToolDeactivate(nextTool) {
if (this.warnings) {
console.warn('Method "onToolDeactivate" not implemented.');
}
}
onNodeClick(node) { onNodeClick(node) {
if (this.warnings) { if (this.warnings) {
console.warn('Method "onNodeClick" not implemented.'); console.warn('Method "onNodeClick" not implemented.');
......
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