diff --git a/package.json b/package.json index bdb6524..40ba243 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@svgdotjs/svg.draw.js", - "version": "3.0.1", + "version": "3.0.2", "description": "An extension for svg.js which allows to draw elements with mouse", "type": "module", "keywords": [ diff --git a/src/svg.draw.js b/src/svg.draw.js index 27a777a..356a360 100644 --- a/src/svg.draw.js +++ b/src/svg.draw.js @@ -87,7 +87,7 @@ class PaintHandler { this.el.fire('drawstart', { event: event, p: this.p, m: this.m }) // We need to bind the update-function to the mousemove event to keep track of the cursor - on(window, 'mousemove.draw', function (e) { + on(window, 'pointermove.draw', function (e) { _this.update(e) }) @@ -120,7 +120,7 @@ class PaintHandler { } // Unbind from all events - off(window, 'mousemove.draw') + off(window, 'pointermove.draw') this.parent.off('click.draw') // remove Refernce to PaintHandler @@ -222,7 +222,7 @@ class PaintHandler { } extend(Element, { - // Draw element with mouse + // Draw element with pointer draw: function (event, options, value) { // sort the parameters if (!(event instanceof Event || typeof event === 'string')) {