Comparing version 2.1.6 to 2.1.7
@@ -8,2 +8,8 @@ # Change Log | ||
## [2.1.7][2018-07-03] | ||
## Fixed | ||
* Some drag&drop fixes | ||
## [2.1.6][2018-06-16] | ||
@@ -10,0 +16,0 @@ |
{ | ||
"name": "konva", | ||
"version": "2.1.6", | ||
"version": "2.1.7", | ||
"author": "Anton Lavrenov", | ||
@@ -5,0 +5,0 @@ "files": [ |
@@ -26,3 +26,3 @@ <p align="center"> | ||
```html | ||
<script src="https://cdn.rawgit.com/konvajs/konva/2.1.6/konva.min.js"></script> | ||
<script src="https://cdn.rawgit.com/konvajs/konva/2.1.7/konva.min.js"></script> | ||
<div id="container"></div> | ||
@@ -29,0 +29,0 @@ <script> |
@@ -320,12 +320,11 @@ (function() { | ||
if (Konva.isBrowser) { | ||
var html = Konva.document.documentElement; | ||
html.addEventListener('mouseup', Konva.DD._endDragBefore, true); | ||
html.addEventListener('touchend', Konva.DD._endDragBefore, true); | ||
window.addEventListener('mouseup', Konva.DD._endDragBefore, true); | ||
window.addEventListener('touchend', Konva.DD._endDragBefore, true); | ||
html.addEventListener('mousemove', Konva.DD._drag); | ||
html.addEventListener('touchmove', Konva.DD._drag); | ||
window.addEventListener('mousemove', Konva.DD._drag); | ||
window.addEventListener('touchmove', Konva.DD._drag); | ||
html.addEventListener('mouseup', Konva.DD._endDragAfter, false); | ||
html.addEventListener('touchend', Konva.DD._endDragAfter, false); | ||
window.addEventListener('mouseup', Konva.DD._endDragAfter, false); | ||
window.addEventListener('touchend', Konva.DD._endDragAfter, false); | ||
} | ||
})(); |
@@ -518,5 +518,8 @@ (function() { | ||
// try to drag and drop the canvas element | ||
if (evt.cancelable) { | ||
evt.preventDefault(); | ||
} | ||
// TODO: if we preventDefault() it will cancel event detection outside of window | ||
// but we need it for better drag&drop | ||
// can we disable native drag&drop somehow differently? | ||
// if (evt.cancelable) { | ||
// evt.preventDefault(); | ||
// } | ||
}, | ||
@@ -523,0 +526,0 @@ _mouseup: function(evt) { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1279166
36534