update CHANGELOG with new version

This commit is contained in:
Anton Lavrenov
2020-07-09 16:50:50 -05:00
parent 8bf97ba8c1
commit b5e7362d26
6 changed files with 1390 additions and 53 deletions

View File

@@ -64,10 +64,10 @@ export class Layer extends Container<Group | Shape> {
constructor(config?: LayerConfig) {
super(config);
this.on('visibleChange', this._checkVisibility);
this.on('visibleChange.konva', this._checkVisibility);
this._checkVisibility();
this.on('imageSmoothingEnabledChange', this._setSmoothEnabled);
this.on('imageSmoothingEnabledChange.konva', this._setSmoothEnabled);
this._setSmoothEnabled();
}
// for nodejs?

View File

@@ -2461,8 +2461,17 @@ export abstract class Node<Config extends NodeConfig = NodeConfig> {
* drag and drop mode
*/
var stage = this.getStage();
if (stage && DD._dragElements.has(this._id)) {
if (!stage) {
return;
}
const dragElement = DD._dragElements.get(this._id);
const isDragging = dragElement && dragElement.dragStatus === 'dragging';
const isReady = dragElement && dragElement.dragStatus === 'ready';
if (isDragging) {
this.stopDrag();
} else if (isReady) {
DD._dragElements.delete(this._id);
}
}
}