mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 04:14:52 +08:00
update CHANGELOG with new version
This commit is contained in:
@@ -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?
|
||||
|
11
src/Node.ts
11
src/Node.ts
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user