Started bs-gantt

This commit is contained in:
STEINNI
2026-08-28 19:40:56 +00:00
parent 7471a37220
commit 6e902b91fd
9 changed files with 454 additions and 5 deletions
+3 -3
View File
@@ -230,8 +230,8 @@ class BZgraflow extends Buildoz{
}
if(typeof(node.data)=='object') Object.assign(this.stagedNodes[id].dataset, node.data)
const portEls = this.stagedNodes[id].querySelectorAll('.port')
this.stagedNodes[id].style.left = (node.coords && node.coords.x) ? `${node.coords.x}px` : '10%'
this.stagedNodes[id].style.top = (node.coords && node.coords.y) ? `${node.coords.y}px` : '10%'
this.stagedNodes[id].style.left = (node.coords && node.coords.x != null) ? `${node.coords.x}px` : '10%'
this.stagedNodes[id].style.top = (node.coords && node.coords.y != null) ? `${node.coords.y}px` : '10%'
this.stagedNodes[id].dataset.id = id
this.stagedNodes[id].ports = Object.fromEntries(Array.from(portEls).map(item => ([item.dataset.id, { ...item.dataset, el:item }])))
if(node.subflow) {
@@ -490,7 +490,7 @@ class BZgraflow extends Buildoz{
this.clear()
let forceAutoplace = false
for(const node of this.flow.nodes){
if((!node.coords) || (!node.coords.x) ||(!node.coords.y)) forceAutoplace=true
if((!node.coords) || (node.coords.x == null) || (node.coords.y == null)) forceAutoplace=true
this.addNode(node)
}
for(const link of this.flow.links){