Uniquify IDs in SVG-Edit
Since we can have several SVG-Edit graphics on a page, SVG-Edit should assign unique IDs to elements, and do so in a fashion that survives re-editing. To do this, we use a nonce, and record its value in a custom se:nonce attribute on the <svg> element. (Is there a better way?). Also, preserve the custom se:connector attribute for later editing purposes.
This commit is contained in:
parent
c4003f79b3
commit
aa0a151ba4
4 changed files with 34 additions and 8 deletions
|
@ -78,8 +78,6 @@ $(function() {
|
|||
mrow.appendChild(children[0]);
|
||||
}
|
||||
S.sanitizeSvg(math);
|
||||
//elt.setAttribute('width', math.clientWidth+5);
|
||||
//elt.setAttribute('height', math.clientHeight+5);
|
||||
S.call("changed", [elt]);
|
||||
});
|
||||
elt.replaceChild(math, elt.firstChild);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue