TheCoder4eu / BootsFaces-OSP

BootsFaces - Open Source Project
Apache License 2.0
247 stars 102 forks source link

Canvas event.getX() and event.getY() for onclicked() bound to underlying ManagedBean #1112

Closed cdberkstresser closed 4 years ago

cdberkstresser commented 4 years ago

Is there any possibility of capturing an onclick event in the canvas class that can be bound to the underlying JSF ManagedBean with an x and y property denoting the location of where the canvas was clicked?

geopossachs commented 4 years ago

Hallo @cdberkstresser You can try at first with jsf pass-through to add js callback function for a canvas event. A second you can call from this js callback function a

cdberkstresser commented 4 years ago

Thanks for the reply! remoteCommand was the missing piece of the puzzle. I finally got a clickable canvas!
https://cberkstresser.name:8443/QuantumWeb/faces/QuantumCircuitDesigner.xhtml