Hi Tim,
This is exactly what I was asking for. Found a workaround, but I wanted to do
it in the right way.
Kind Regards.
Enviar: martes 24 de septiembre de 2019 a las 3:41
De: "Tim Thompson" <mailto:[email protected]>
Para: "Jorge sr" <mailto:[email protected]>
CC: mailto:[email protected]
Asunto: Re: [Xsltforms-support] Reenviar: XForms trigger on svg elements
Sorry--this is not a feature I use as often as I should! The SVG "g" element
can be the observer, but the event phase needs to be declared as "capture."
<dispatch ev:observer="my-g" ev:event="DOMActivate" ev:phase="capture"
targetid="m" name="svg-g-trigger"/>
--
Tim A. Thompson
Discovery Metadata Librarian
Yale University Library
mailto:[email protected]
On Mon, Sep 23, 2019 at 9:34 PM Tim Thompson <mailto:[email protected]> wrote:
Hi, Jorge,
I may be missing something, but I think this should be possible just by
declaring an SVG element to be an observer of the DOMActivate event. For
example:
<dispatch ev:observer="my-circle" ev:event="DOMActivate" targetid="m"
name="svg-circle-trigger"/>
See this page for a working example: https://www.tat2.io/basex/svg-test
Here, I have an SVG "circle" and "text" element within a "g" element. I had to
make each of the child elements observers. I tried making the containing "g"
element the observer, but that didn't seem to work. Any ideas why not?
Is this close to what you were looking for?
Best regards,
Tim
--
Tim A. Thompson
Discovery Metadata Librarian
Yale University Library
mailto:[email protected]
On Mon, Sep 23, 2019 at 3:25 PM Jorge sr <mailto:[email protected]> wrote:
Hi,
I want to add a trigger to an svg on a form based on Xsltforms. For now I
managed to launch the submissions with the following call from an onclick.
XsltForms_xmlevents.dispatch(document.getElementById("actual-trigger-id"),"DOMActivate")
This has two obvious disadvantages. First, it is not a proper XForms solution
and is coupled to the framework. The second one is that at any time an update
in the xsltforms may break the solution.
Is there a "good way" to add a trigger to an svg element in XForms?
Kind Regards,
Jorge Sánchez
@Alain thanks in advance, amazing work ;)
_______________________________________________
Xsltforms-support mailing list
mailto:[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support