I’ve been working on a complicated interactive SVG infographic, and I’ve learned I can use <$link>
widgets to make ordinary <a>
tags within it.
I’ve been trying to create the SVG element as something within the TiddlyWiki widget tree. So, I’ve been trying to create the tag using <$button tag="g">
. But then the particular <g>
curve doesn’t render.
Wrapping the <g>
in a <$link>
does work, and I understand that it creates a neutral <a>
element wrapping the <g>
element. But using <$link>
I can only navigate to another tiddler. I can’t, as far as I know, set a field. So I’ve tried wrapping that link widget with a <$linkcatcher>
widget, using its actions
attribute to specify action widgets to be activated:
<$linkcatcher actions="""<$action-setfield $field="myfield" $value="new value"/>""">
But, again, this causes the <g>
tag that is wrapped by all of that not to render.
The best research I can achieve indicates that I have to separate the SVG from a button widget triggering the set-field action. I guess I’ll have to work on positioning that to appear to be part of the rest of the SVG image.
I have to assume that there’s something about the order of processing for the widget tree that is causing this behavior, but I can’t imagine a straightforward reason why a button widget can’t simply be a <g>
tag. I’m really curious to know whether a single SVG approach, without a separated widget, is possible.