Open Rec1dite opened 11 months ago
Make sure to abstract <DefaultAnchor />
in PluginNode.svelte
into a separate .svelte
file that supports all the anchor shapes. You should be able to replace <DefaultAnchor ... />
with something like this:
<PluginAnchor fill={config["fill"] ?? stringToColor(input.type)} stroke={ ... } shape={config["shape"] ?? "circle"} />
I'd like if plugins had the option to specify custom shapes for anchors, instead of just circles. Also potentially they should be allowed to specify a custom fill color/outline.
This would be particularly useful for Ripple, where I need a left-pointing arrow anchor, to better represent the flow of program execution.
See the below example from Unreal Engine's blueprints system, except their arrows point to the right (ours will point to the left):
The best way to do this, I think, is to expose some kind of setter in the TypeClassBuilder like so: