edemaine / cocreate

Cocreate Shared Whiteboard/Drawing
MIT License
209 stars 27 forks source link

Disable drawing with right click (#31) #33

Closed PMKielstra closed 4 years ago

PMKielstra commented 4 years ago

Two possible ways to go about this: either don't pass right-click events to tools, or let each tool decide what it will and won't do with right-click events. Since we might later want tools that support both buttons, I went for the latter philosophy, and now the pen down function returns if button == 2.

edemaine commented 4 years ago

Thanks for the suggestion! More likely, I'm going to want to define all sorts of behavior for right-click, so instead I've disabled the context menu within <svg> elements in https://github.com/edemaine/cocreate/commit/46b0a88a9f37b90ed238aeb9232763ebe879da48.