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.
我想在我的 svg-canvas 中获取选定元素的 id 作为变量以在函数中使用它。我认为 var selected = svgCanvas.getSelectedElems; 不传递特定的 id。有任何想法吗?
您可以直接使用 selectedElement.id
var elementSel = selectedElement.id;