diff options
Diffstat (limited to 'core/vendor')
-rw-r--r-- | core/vendor/core.js | 6 | ||||
-rw-r--r-- | core/vendor/snapjs/dist/latest/snap.js | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/core/vendor/core.js b/core/vendor/core.js index bda270892ad..e573ef10642 100644 --- a/core/vendor/core.js +++ b/core/vendor/core.js @@ -6704,9 +6704,13 @@ dav.Client.prototype = { /** * Disables Snap.js events + * @param {Boolean} endCurrentDrag Whether to end the current drag (if any) or not. */ - disable: function() { + disable: function(endCurrentDrag) { utils.dispatchEvent('disable'); + if (endCurrentDrag) { + this.action.drag.endDrag(); + } this.action.drag.stopListening(); }, diff --git a/core/vendor/snapjs/dist/latest/snap.js b/core/vendor/snapjs/dist/latest/snap.js index a0274138de0..7ae088d0aea 100644 --- a/core/vendor/snapjs/dist/latest/snap.js +++ b/core/vendor/snapjs/dist/latest/snap.js @@ -744,9 +744,13 @@ /** * Disables Snap.js events + * @param {Boolean} endCurrentDrag Whether to end the current drag (if any) or not. */ - disable: function() { + disable: function(endCurrentDrag) { utils.dispatchEvent('disable'); + if (endCurrentDrag) { + this.action.drag.endDrag(); + } this.action.drag.stopListening(); }, |