This commit is contained in:
2024-12-20 10:29:39 +01:00
parent a892e1fcb2
commit 5e449e23b8
5 changed files with 313 additions and 34 deletions

View File

@@ -101,10 +101,25 @@ export const panning = function(superClass) {
this.targetElement.style.transform =
`translate(${this.currentX}px, ${this.currentY}px)`;
}
this.requestUpdate();
}
}
_endDrag() {
if (this.isDragging && this.targetElement instanceof TpFlowNode) {
this._dispatchChangeEvent({
type: 'node-moved',
data: {
nodeId: this.targetElement.id,
position: {
x: this.currentX,
y: this.currentY
}
}
});
}
this.isDragging = false;
this.targetElement = null;
}