glyphr-studio / Glyphr-Studio-Desktop

A desktop client for Glyphr Studio built in electron
Other
437 stars 46 forks source link

Native right-click canvas actions #7

Open mattlag opened 8 years ago

mattlag commented 8 years ago

Right now we expose all actions through the Actions Panel, and right-click is browser default. It would be great if we could have native right-click commands, contextual to the shape / point / handle / whatever that was clicked on.

kethinov commented 8 years ago

I think this should be a feature shared with the web version as well. There are ways to do JS-driven right click menu UIs purely in web. We can write one that can be context-aware. If the execution environment is the desktop application, we'll use the native APIs. If the execution environment is the browser, we can draw a custom right click menu. What do you think?

mattlag commented 8 years ago

I have definitely thought about adding this to the web version... it's just a priority thing :-)

I think the one thing I will do is start to separate the individual actions from the HTML. Right now they are all mixed together. Ideally, it would be great to have a higher-level association between action name, what function(s) it triggers, and when it's contextually shown or hidden.

Once we have that high level structure, it would be easy to take that and spit out HTML for the actions pane, or spit out a right-click menu, or whatever.