mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Fix id clash in SVGExport.
This commit is contained in:
parent
ace23d354d
commit
2241329321
2 changed files with 5 additions and 5 deletions
|
@ -37,9 +37,9 @@
|
||||||
justification: 'center',
|
justification: 'center',
|
||||||
content: mode
|
content: mode
|
||||||
})
|
})
|
||||||
var clip = new Group(rect, img, text);
|
var group = new Group(rect, img, text);
|
||||||
clip.position = point;
|
group.position = point;
|
||||||
all.addChild(clip);
|
all.addChild(group);
|
||||||
}
|
}
|
||||||
|
|
||||||
var modes = [ 'normal', 'multiply', 'screen', 'overlay', 'soft-light',
|
var modes = [ 'normal', 'multiply', 'screen', 'overlay', 'soft-light',
|
||||||
|
|
|
@ -461,9 +461,9 @@ new function() {
|
||||||
getDefinition();
|
getDefinition();
|
||||||
// Have different id ranges per type
|
// Have different id ranges per type
|
||||||
var id = definitions.ids[type] = (definitions.ids[type] || 0) + 1;
|
var id = definitions.ids[type] = (definitions.ids[type] || 0) + 1;
|
||||||
// Give the svg node an id, and link to it from the id.
|
// Give the svg node an id, and link to it from the item id.
|
||||||
node.id = type + '-' + id;
|
node.id = type + '-' + id;
|
||||||
definitions.svgs[node.id] = node;
|
definitions.svgs[type + '-' + item._id] = node;
|
||||||
}
|
}
|
||||||
|
|
||||||
function exportDefinitions(node) {
|
function exportDefinitions(node) {
|
||||||
|
|
Loading…
Reference in a new issue