space: scribble: make tool sticky, button toggles the tool

This commit is contained in:
mntmn
2020-04-19 13:58:17 +02:00
parent b5c6a79c0c
commit 43d21ddb6c
2 changed files with 6 additions and 2 deletions

View File

@@ -2558,7 +2558,11 @@ var SpacedeckSections = {
},
start_drawing_scribble: function(evt) {
this.active_tool = "scribble";
if (this.active_tool == "scribble") {
this.active_tool = "pointer";
} else {
this.active_tool = "scribble";
}
this.opened_dialog = "none";
},

View File

@@ -735,7 +735,7 @@ function setup_whiteboard_directives() {
return;
}
if (_.include(["zoom"], $scope.active_tool)) {
if (_.include(["zoom", "scribble"], $scope.active_tool)) {
// tools that stay active after use
this.mouse_state = "idle";
$scope.mouse_state = this.mouse_state;