}
this.data = cached;
this.defaultData = cached;
+ cleanDiagramCache();
}
@SyncField("targetSize")
diagramCache = null;
}
- // Lets check for rootAssignment that contributes the whole SVG
+ // Lets check for rootAssignment that contributes the whole SVG
SVGNodeAssignment rootAssignment = null;
if (!assignments.isEmpty()) {
for (SVGNodeAssignment ass : assignments) {
} else {
e.setAttribute(ass.attributeNameOrId, ass.value);
}
+ } else {
+ System.err.println("Element with id='" + ass.elementId + " was not found.");
}
}
boolean changed = false;
+ // Without this elements are sometimes not found by id!
+ diagram.updateTime(0);
+
for (SVGNodeAssignment ass : assignments) {
SVGElement e = diagram.getElement(ass.elementId);
if (e != null) {
}
}
+ // Without this the attribute values are not correctly reflected in rendering
+ diagram.updateTime(0);
+
return changed;
}
URI uri = univ.loadSVG(new ByteArrayInputStream(dataBytes), digest);
diagramCache = univ.getDiagram(uri, false);
if (diagramCache != null) {
- SVGRoot root = diagramCache.getRoot();
+ SVGRoot root = diagramCache.getRoot();
if (root == null) return new Rectangle2D.Double();
return (Rectangle2D)root.getBoundingBox().clone();
}