mirror of
https://github.com/konvajs/konva.git
synced 2025-10-08 00:14:23 +08:00
fixed bug related to multiple drag and drop initializations
This commit is contained in:
12
dist/kinetic-core.js
vendored
12
dist/kinetic-core.js
vendored
@@ -628,7 +628,7 @@ Kinetic.Node.prototype = {
|
||||
*/
|
||||
draggable: function(isDraggable) {
|
||||
if(this.draggable !== isDraggable) {
|
||||
if(isDraggable) {
|
||||
if(isDraggable && this.isDragging()) {
|
||||
this._initDrag();
|
||||
}
|
||||
else {
|
||||
@@ -1187,7 +1187,15 @@ Kinetic.Stage.prototype = {
|
||||
addLayer(n);
|
||||
}
|
||||
else {
|
||||
callback(bufferLayer.getCanvas().toDataURL(mimeType, quality));
|
||||
try {
|
||||
// If this call fails (due to browser bug, like in Firefox 3.6),
|
||||
// then revert to previous no-parameter image/png behavior
|
||||
callback(bufferLayer.getCanvas().toDataURL(mimeType, quality));
|
||||
}
|
||||
catch(exception)
|
||||
{
|
||||
callback(bufferLayer.getCanvas().toDataURL());
|
||||
}
|
||||
}
|
||||
};
|
||||
imageObj.src = dataURL;
|
||||
|
2
dist/kinetic-core.min.js
vendored
2
dist/kinetic-core.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user