How to import svgs from a library #358
Replies: 2 comments 3 replies
-
In my opinion, it's also an important feature to add, like custom DAQs, but it also requires an improvement on the SVG animations system. For example, adding the custom animation type on the shape object or defining the transformation function inside the shape objects with anonymous functions, making a kind of custom shape component which takes some component behaviors from the shapes library file. I will maybe try to implement it in the future for my projects, I think that is a good improvement for the project, together with a parser to link the content of the shapes to an SVG file or maybe a shapes.js generator script from SVG files. |
Beta Was this translation helpful? Give feedback.
-
Hi, |
Beta Was this translation helpful? Give feedback.
-
Dear FUXA team,
I want to extend the available svgs in the editor and have found the wiki page on how to add new shapes here: https://github.com/frangoteam/FUXA/wiki/HowTo-define-Shapes
I tried this approach. To me it looks like the svg file then is only used to display the icon in the menu, but if you want to use it in the editor pane, the content attribute is actually used, which seems to be a json representation of the svg contents.
While this approach works for manually adding a few icons which only contain a few paths, it's impossible to import e.g. a library of 500 svgs where each svg is complex, meaning the solution doesn't scale at all. My question now is - do you maybe have a tool available that parses a svg to this json format? This would already help alot!
Best regards,
Hendrik
Beta Was this translation helpful? Give feedback.
All reactions