We should define a different class name for each SVG content, and it is mandatory. If not, the style will be overridden for each SVG content by default. |
Actually, I'm observing this as well (please see attached gif file and svg file).
This seems to happen whenever there is a 'gradientTransform', 'linearGradient' or 'gradientUnits' in the svg (native) node.
Attachment: kotlin_9a9b65c8.zip
Hi Aravind,
The linear gradient IDs are defined in the native node's SVG files (please see attached kotlin.svg file). The IDs are unique (I've double-checked my codebase). Also, I'm not using any class names in SVG files.
In my code base, other than SVG files, I don't set linear/radial gradients
anywhere else: not via node's style properties or nor via CSS.
However, I think, because, the same SVG file is loaded both in the palette and in the diagram, the IDs in the SVG files are somehow colliding.
I've attached the diagram json + SVG file.
Thanks,
-Mithun
Attachment: diagrampaletteissue_85150ebb.zip
public drop(args: IDropEventArgs) {
if (args.source instanceof SymbolPaletteComponent &&(args.element as Node).id.includes("newshape")) {
(args.element as Node).shape = { type: 'Native', content: newTemplate};
}
} |