space: deselect when using tools; normalize note tool behavior

This commit is contained in:
mntmn
2020-09-28 00:04:18 +02:00
parent 2a2c7011c0
commit 7c6d5c83db
2 changed files with 14 additions and 1 deletions

View File

@@ -2555,7 +2555,18 @@ var SpacedeckSections = {
evt = fixup_touches(evt);
},
start_adding_note: function(evt) {
this.deselect();
if (this.active_tool == "note") {
this.active_tool = "pointer";
} else {
this.active_tool = "note";
}
this.opened_dialog = "none";
},
start_drawing_scribble: function(evt) {
this.deselect();
if (this.active_tool == "scribble") {
this.active_tool = "pointer";
} else {
@@ -2565,11 +2576,13 @@ var SpacedeckSections = {
},
start_drawing_arrow: function(evt) {
this.deselect();
this.active_tool = "arrow";
this.opened_dialog = "none";
},
start_drawing_line: function(evt) {
this.deselect();
this.active_tool = "line";
this.opened_dialog = "none";
},