diff --git a/src/helper/blob-tools/blob.js b/src/helper/blob-tools/blob.js index 7c1baf3e..38249653 100644 --- a/src/helper/blob-tools/blob.js +++ b/src/helper/blob-tools/blob.js @@ -125,7 +125,6 @@ class Blobbiness { }; this.tool.onMouseUp = function (event) { - blob.resizeCursorIfNeeded(event.point); if (event.event.button > 0 || !this.active) return; // only first mouse button let lastPath; @@ -143,11 +142,9 @@ class Blobbiness { blob.mergeBrush(lastPath); } - blob.cursorPreview.visible = false; + blob.cursorPreview.remove(); + blob.cursorPreview = null; blob.onUpdateSvg(); - blob.cursorPreview.visible = true; - blob.cursorPreview.bringToFront(); - blob.cursorPreview.position = event.point; // Reset blob.brush = null; @@ -432,8 +429,10 @@ class Blobbiness { } deactivateTool () { - this.cursorPreview.remove(); - this.cursorPreview = null; + if (this.cursorPreview) { + this.cursorPreview.remove(); + this.cursorPreview = null; + } this.tool.remove(); this.tool = null; }