In another discussion we had an agreement to send a
msg.event property on some of the UI nodes. So I also implemented that change in version 2.0.0 of the SVG node, which is not on NPM yet (which will be released this week)!
However the ContextMenu node searched its coordinates in the
msg.position (hardcoded), instead of in ``msg.event`. To avoid that everybody needs to add Change nodes all over the place (to move the message fields), version 2.0.0 of the ContextMenu node has following changes:
It is possible to specify the X and Y coordinate values separately, as fixed coordinate value or as a specified input message field:
The menu can now also be delivered in any specified input message field:
Or fixed as before:
The readme file contains more examples and flows. I have also added the demo from @Paul-Reed to the readme, because it demonstrates nicely how the node can be used without the SVG node. Thanks Paul!
The example flows are now available via the flow editor "Import" menu:
The input messages are now validated on the server side, which allows me to show some validation errors in the debug panel.
Would be nice if somebody could install this new version from Github, and test it:
npm install bartbutenaers/node-red-contrib-ui-contextmenu
I have added migration logic, so 'normally' the old hardcoded message fields should be automatically filled in into the typedinputs.
As soon as this node is on NPM, I will publish the SVG node.