bartbutenaers / node-red-contrib-ui-svg

A Node-RED widget node to show interactive SVG (vector graphics) in the dashboard
Apache License 2.0
93 stars 27 forks source link

event not working after upgrade #77

Closed smcgann99 closed 3 years ago

smcgann99 commented 3 years ago

Hi,

I have a floor plan with icons for devices. Clicking sends a message to toggle the device on or off. This WAS working before upgrade. Reading the notes I see that there are some changes to payload format, but as I'm just using the built in event feature, so not sure why this would affect me? The events no longer trigger when clicked.

I have checked debug from node and noticed that the payload doesn't seem to match the documentation. there is no "elementId" or "selector" , this is what I see -

msg : Object object type: "click" pageX: 1146 pageY: 425 screenX: 1146 screenY: 527 clientX: 1146 clientY: 425 svgX: 356 svgY: 304 bbox: array[4]

RavenSpy commented 3 years ago

Hi, I see that I am not the only one who is having the same problem, I thought it was just me. The same thing happens to me, I have tried to do a zero installation and easy circle click event, but it only gives the same results. output_info

Thanks and regards.

bartbutenaers commented 3 years ago

Hello @smcgann99, In the 2.0.0 version there were indeed breaking changes. Unfortunately I could not avoid that. Therefore it was a released as a major version.

However in the 2.1.0 version there shouldn't be a breaking change. Then it will be a bug.

What was your previous version, where the floorplan was working correctly? Bart

RavenSpy commented 3 years ago

I made a clean installation, with last versión of node-red-dashboard 2.24.1 and node-red-contrib-ui-svg 2.1.0. event simple

bartbutenaers commented 3 years ago

Hi @RavenSpy, I will have a look this evening, and try to create a fix in a couple of hours. First some family business... Bart

RavenSpy commented 3 years ago

Of course Bart, don't worry, it's not a matter of life and death. Enjoy the family! Thanks in advice, regards.

smcgann99 commented 3 years ago

Bart, I think it was latest before 2.1.

bartbutenaers commented 3 years ago

Hey guys, Luckely the wife and kids had to do some other things before our movie evening started :-) So I quickly fixed it and published version 2.1.1 on NPM. It is now available in the palette:

image

Would be nice if you could let me know if it is solved now. Because I can imagine this is a nasty bug for users...

RavenSpy commented 3 years ago

Lol Bart so fast jaja. It seems working for me. worked Thanks a lot!

smcgann99 commented 3 years ago

All good for me as well thanks very much. If I can just figure out why my animations work in firefox but not chrome - but thats for another day ;-)