我使用Snap.svg API。我需要一个元素的位置:
const outPort = paper.select(`#${outPortId}`);
console.log(`outPort: {x:${outPort.attr("x")},y:${outPort.attr("y")}}`);控制台输出:
outPort:{x:null,y:null}
如何在Snap.svg API中获得元素位置?
发布于 2021-10-02 20:35:54
https://stackoverflow.com/questions/54343591
复制相似问题