Fix Bug 751: Importing was not successfully ID'ing elements
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1903 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
53962cabb8
commit
89641094de
|
@ -6422,6 +6422,7 @@ var uniquifyElems = this.uniquifyElems = function(g) {
|
|||
if(href && ref_elems.indexOf(n.nodeName) >= 0)
|
||||
{
|
||||
var refid = href.substr(1);
|
||||
if (refid) {
|
||||
if (!(refid in ids)) {
|
||||
// add this id to our map
|
||||
ids[refid] = {elem:null, attrs:[], hrefs:[]};
|
||||
|
@ -6429,10 +6430,12 @@ var uniquifyElems = this.uniquifyElems = function(g) {
|
|||
ids[refid]["hrefs"].push(n);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// in ids, we now have a map of ids, elements and attributes, let's re-identify
|
||||
for (var oldid in ids) {
|
||||
if (!oldid) continue;
|
||||
var elem = ids[oldid]["elem"];
|
||||
if (elem) {
|
||||
var newid = getNextId();
|
||||
|
|
Loading…
Reference in New Issue