mirror of
https://github.com/spacedeck/spacedeck-open.git
synced 2025-12-16 09:57:30 +01:00
space: deselect when using tools; normalize note tool behavior
This commit is contained in:
@@ -2555,7 +2555,18 @@ var SpacedeckSections = {
|
|||||||
evt = fixup_touches(evt);
|
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) {
|
start_drawing_scribble: function(evt) {
|
||||||
|
this.deselect();
|
||||||
if (this.active_tool == "scribble") {
|
if (this.active_tool == "scribble") {
|
||||||
this.active_tool = "pointer";
|
this.active_tool = "pointer";
|
||||||
} else {
|
} else {
|
||||||
@@ -2565,11 +2576,13 @@ var SpacedeckSections = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
start_drawing_arrow: function(evt) {
|
start_drawing_arrow: function(evt) {
|
||||||
|
this.deselect();
|
||||||
this.active_tool = "arrow";
|
this.active_tool = "arrow";
|
||||||
this.opened_dialog = "none";
|
this.opened_dialog = "none";
|
||||||
},
|
},
|
||||||
|
|
||||||
start_drawing_line: function(evt) {
|
start_drawing_line: function(evt) {
|
||||||
|
this.deselect();
|
||||||
this.active_tool = "line";
|
this.active_tool = "line";
|
||||||
this.opened_dialog = "none";
|
this.opened_dialog = "none";
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
<div class="dropdown bottom light center">
|
<div class="dropdown bottom light center">
|
||||||
<div class="btn-collapse in">
|
<div class="btn-collapse in">
|
||||||
<button class="btn btn-transparent btn-icon-labeled" v-on:click="active_tool='note'" v-bind:class="{active:active_tool=='note'}">
|
<button class="btn btn-transparent btn-icon-labeled" v-on:click="start_adding_note()" v-bind:class="{active:active_tool=='note'}">
|
||||||
<span class="icon icon-tool-text"></span>
|
<span class="icon icon-tool-text"></span>
|
||||||
<span class="icon-label"><%=__("tool_text")%></span>
|
<span class="icon-label"><%=__("tool_text")%></span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user