summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/kitfox/svg/SVGElement.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/kitfox/svg/SVGElement.java')
-rw-r--r--src/main/java/com/kitfox/svg/SVGElement.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/com/kitfox/svg/SVGElement.java b/src/main/java/com/kitfox/svg/SVGElement.java
index 4a330f4..fe50dd5 100644
--- a/src/main/java/com/kitfox/svg/SVGElement.java
+++ b/src/main/java/com/kitfox/svg/SVGElement.java
@@ -272,6 +272,14 @@ abstract public class SVGElement implements Serializable
{
if (hasAttribute(name, attribType)) throw new SVGElementException(this, "Attribute " + name + "(" + AnimationElement.animationElementToString(attribType) + ") already exists");
+ //Alter layout for id attribute
+ if ("id".equals(name))
+ {
+ diagram.removeElement(this.id);
+ this.id = name;
+ diagram.setElement(this.id, this);
+ }
+
switch (attribType)
{
case AnimationElement.AT_CSS: