wip
This commit is contained in:
15
panning.js
15
panning.js
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user