Hello there
I have built a search page that looks like this, where the content is just an html widget
Is it possible to add in this html OSC calls like in a normal widget?
Or should I redevelop all using the widgets instead?
Thanks
Hello there
I have built a search page that looks like this, where the content is just an html widget
Is it possible to add in this html OSC calls like in a normal widget?
Or should I redevelop all using the widgets instead?
Thanks
Html don't expose their events currently, it could be something worth adding though.
Thanks Jean!
is it something you could think to do in a next release or should I refactor all with widgets instead of waiting?
one reason why to use html instead of widgets is performance, here I am creating an HTML page dynamically for each search and this can be really a long one, creating a widget for each of the action means thousands of widgets, while the HTML solution allows me to have a long page with less resources used, however would be great to trigger an OSC action from there too
Marco
Yes, it's now possible in v1.13.2, but using the canvas widget instead of the html widget because it already had the required api and because the html widget itself is kind of a legacy feature now.
Now you can add extra html in the canvas widget and determine which element is touched (in the touch
property) using the element's name
attribute. Here's a minimal example:
canvas_html.json (2.4 KB)
It may be just a step towards providing a more consistent way to create custom controls (and maybe unifying the canvas/html/svg/scripting implementation), but I'm not quite there yet.