将单元格添加为嵌入元素时,其x和y值仍相对于纸张而不是父级。有没有办法使用相对坐标?如果没有,有什么关于如何实现它的提示吗?
谢谢
发布于 2016-11-08 18:40:29
您可以在dia.Element
上使用position
方法:
childCell.position({parentRelative: true})
它获得相对于它的父级的位置
或者,您可以使用point.difference
计算相对于任何点的位置。在这种情况下,您将获得cell
相对于referenceCell
的相对位置:
var point = g.Point(referenceCell.get('position'))
.difference(cell.get('position'))
https://stackoverflow.com/questions/24555690
复制相似问题