0

I'm just making a simple painting app for practice using canvas and I can't decide whether or not I want right click to do anything.

For example, in Microsoft Paint you can have two colors and use left click to draw with the primary color and right click to draw with the secondary color.

I googled for online painting apps and I see most opt to only allow left click drawing and have some context menu show up on right click allowing you to save the image and whatnot.

Here are the pros and cons I can think of for having left and right click drawing:

Pros:

  • Don't have to switch to eraser tool for simple erasing (can just use right click)
  • Don't have to go to the color palette as often to change colors
  • Can potentially utilize it for filling rectangles and ellipses with the secondary color
  • Might not have to include an eraser tool
  • Increases efficiency by providing an accessible hotkey for additional functionality in the app
  • There's no reason a user would likely ever need to right click on the canvas for

Cons:

  • Some browsers might not abide with the javascript that prevents right click
  • It would be difficult for tablets and mobile phones to use the right click functionality
  • Most likely primary color and secondary color boxes would have to be added to the UI (as opposed to just highlighting the currently selected color with the mono-color approach)
  • More complicated logic and harder to get right in the code and as a result it is likely there will be more bugs
  • Potentially not as intuitive/simple as a mono-color approach to the user
  • Alters native browser functionality that is unexpected to the user

If I chose not to use right click drawing, what should be done with it? Have it cancel the current brush stroke/shape? Don't do anything with it? Some other painting functionality context menu options the user could choose?

  • I wouldn't use right click. Just have a tool palette and give each tool a keyboard shortcut. You could also have a shortcut to switch foreground and background color. – Larivact Sep 27 '15 at 7:27
  • 1
    Contextual menus are always useful, but should always be a secondary way to get to things--rather than be the only means of interaction. – DA01 Sep 27 '15 at 21:57
1

Generally speaking there are two ways I have seen right-click menus used in painting software: a) a tool pallet or b) a contextual menu

Sumo Paint is probably the best online painting app there is - They use a fully contextual right-click menu based on what tool is selected, what is on the canvas at the time and what conditions (selected, masked areas, etc) are imposed on the canvas at the time.

Without knowing the full extent of functionality for your app, the best answer I can offer you is just to be careful how and when you use a right click menu - using it sparingly and in a consistent way and you should be OK.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.