toggle tools when shape tool or zone tool is selected, remove unused mobile dialog reference

This commit is contained in:
Romuald du Song
2021-07-15 22:03:01 +02:00
parent ef0d085e22
commit a1a737da9b

View File

@@ -592,8 +592,21 @@ var SpacedeckSections = {
return;
}
if (_.contains(["mobile","shapes","zones"],id)) {
if (_.contains(["shapes","zones"],id)) {
this.deselect();
if (id == "zones") {
if (this.active_tool == "zone") {
this.active_tool = "pointer";
} else {
this.active_tool = "zone";
}
} else if (id == "shapes") {
if (this.active_tool == "shape") {
this.active_tool = "pointer";
} else {
this.active_tool = "shape";
}
}
}
this.opened_dialog=id;