graflowEditor: fixed gapy bug , graflow: update flow coords after move
This commit is contained in:
@@ -698,7 +698,6 @@ class BZgraflow extends Buildoz{
|
||||
if(totWidth>maxWidth) maxWidth = totWidth
|
||||
layerWidths.push(totWidth)
|
||||
}
|
||||
|
||||
|
||||
// If any long-links, create placeholders for skipped layers
|
||||
this._virtualLinks = new Map()
|
||||
@@ -751,6 +750,7 @@ class BZgraflow extends Buildoz{
|
||||
y = ((maxHeight - layerHeights[idx]) / 2) + gapy
|
||||
break
|
||||
}
|
||||
console.log('======>',gapy, y)
|
||||
for(const nid of layer){
|
||||
let placedY
|
||||
if(!nid.startsWith('longLinkPlaceHolder_')) {
|
||||
@@ -974,6 +974,12 @@ class BZgraflow extends Buildoz{
|
||||
|
||||
if(p < 1) requestAnimationFrame(frame.bind(this))
|
||||
else{
|
||||
const flowNode = this.flow?.nodes?.find(n => n.id === nid)
|
||||
if(flowNode) {
|
||||
if(!flowNode.coords) flowNode.coords = {}
|
||||
flowNode.coords.x = x
|
||||
flowNode.coords.y = y
|
||||
}
|
||||
this.fireEvent('nodeMoved', { nid, x, y })
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user