diff --git a/src/js/controller/DrawingController.js b/src/js/controller/DrawingController.js index 1985b66ec..a827363bb 100644 --- a/src/js/controller/DrawingController.js +++ b/src/js/controller/DrawingController.js @@ -345,6 +345,8 @@ // Picking color after ALT+click or middle mouse button click. this.pickColorAt_(coords); this.isPickingColor = false; + // Flash the cursor to briefly show the colorpicker cursor. + this.flashColorPicker_(); } else if (isMiddleDrag) { // Stop the drag handler after a middle button drag action. this.dragHandler.stopDrag(); @@ -380,6 +382,16 @@ $.publish(evt, [color]); }; + ns.DrawingController.prototype.flashColorPicker_ = function () { + document.body.classList.add('tool-colorpicker'); + document.body.classList.remove(this.currentToolBehavior.toolId); + window.clearTimeout(this.flashColorPickerTimer); + this.flashColorPickerTimer = window.setTimeout(function () { + document.body.classList.remove('tool-colorpicker'); + document.body.classList.add(this.currentToolBehavior.toolId); + }.bind(this), 200); + }; + /** * Translate absolute x,y screen coordinates into sprite coordinates * @param {Number} screenX