Canvas_Context_Menu
title: How to show a context menu for HTML5 canvas shape? layout: demo_page
Do you want to show a context menu for a canvas shape?
To show a context menu we have to:
- Listen to
contextmenu
event on canvas container (stage) - Prevent default browser behavior, so we don't see native context menu
- Create our own context menu with
Konva
tools or regular html
Instructions: double click on the stage to create a circle. Try right click (context menu) on shapes for a menu.