I created a radial menu in FramerJS. To finalize it I am wondering two things: how to make an event handler for right click, and how to get a layer to track the cursor.
Edit: Just incase the .gif does not work: http://drbl.in/njQt
To create a right click menu, show your menu layer at e.clientX / e.clientY on the "contextmenu" event
document.addEventListener "contextmenu", (e) -> #print e.clientY e.preventDefault()
Thanks. One more question do you have any idea how to make the layers animate out from the cursor, as opposed to from the last position or some arbitrary location? Here is a link to the project http://share.framerjs.com/s53thuy00d64/
I tend to avoid creating one-off states on events - instead I tend to use .animate. If you're really used to using states, you could separate the positioning of the menu from the reveal animation by putting it in a container layer that's easy to manipulate. http://share.framerjs.com/45qi4d88fboz/
Thank you! The menu works flawlessly.