From 2241329321a11f9c72ad9a3e8c28a109a824ff6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Tue, 18 Jun 2013 17:29:00 -0700 Subject: [PATCH] Fix id clash in SVGExport. --- examples/Scripts/BlendModes.html | 6 +++--- src/svg/SVGExport.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/Scripts/BlendModes.html b/examples/Scripts/BlendModes.html index ca1af0eb..041fd6ec 100644 --- a/examples/Scripts/BlendModes.html +++ b/examples/Scripts/BlendModes.html @@ -37,9 +37,9 @@ justification: 'center', content: mode }) - var clip = new Group(rect, img, text); - clip.position = point; - all.addChild(clip); + var group = new Group(rect, img, text); + group.position = point; + all.addChild(group); } var modes = [ 'normal', 'multiply', 'screen', 'overlay', 'soft-light', diff --git a/src/svg/SVGExport.js b/src/svg/SVGExport.js index 9f99aeb6..14287dee 100644 --- a/src/svg/SVGExport.js +++ b/src/svg/SVGExport.js @@ -461,9 +461,9 @@ new function() { getDefinition(); // Have different id ranges per type 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; - definitions.svgs[node.id] = node; + definitions.svgs[type + '-' + item._id] = node; } function exportDefinitions(node) {