From 43d21ddb6c438980160fbc607503385b1c3c1d4f Mon Sep 17 00:00:00 2001 From: mntmn Date: Sun, 19 Apr 2020 13:58:17 +0200 Subject: [PATCH] space: scribble: make tool sticky, button toggles the tool --- public/javascripts/spacedeck_sections.js | 6 +++++- public/javascripts/spacedeck_whiteboard.js | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/public/javascripts/spacedeck_sections.js b/public/javascripts/spacedeck_sections.js index b418d9d..7a9fb70 100644 --- a/public/javascripts/spacedeck_sections.js +++ b/public/javascripts/spacedeck_sections.js @@ -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"; }, diff --git a/public/javascripts/spacedeck_whiteboard.js b/public/javascripts/spacedeck_whiteboard.js index 8857d20..8b8c1da 100644 --- a/public/javascripts/spacedeck_whiteboard.js +++ b/public/javascripts/spacedeck_whiteboard.js @@ -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;