Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道moveCells方法,但我更想将单元格移动到新的绝对位置(而不是相对增量)。我尝试克隆和更新几何,但没有成功:
var geo = graph.getCellGeometry(cell).clone(); geo.x = 10; model.setGeometry(cell, geo);
我错过了什么?
更新几何图形后,您还需要刷新图形。
var geo = graph.getCellGeometry(cell).clone(); geo.x = 10; model.setGeometry(cell, geo); graph.refresh(); // update the graph