Hi, our application requires context menu to behavior like following :
If user right-click a circle, context menu1 appears
If user right-click a square, context menu2 appears
If user right-click empty space, context menu3 appears
We can have up to 60 circles and squares.
We know what and where user clicked, so we decided to use showContextMenu to show different menu. But what we observed is that context menu disappears the moment right mouse button is released. We also tried to use showContextMenu in a sample html – context.html. We made following changes to the html:
1. add onclick to body tag
2. remove style for contextArea
3. add a function called openContextMenu
function openContextMenu() {
menu.showContextMenu(100,100);
}
No context menu appeared upon user clicking.
Can you help us to find out a way to achieve what we need? Thank you!
Yingle