You can listen for the contextmenu event on your canvas (that lets you know the right mouse button was pressed).
$("#canvas").contextmenu(function(e){handleContextMenu(e);});
function handleContextMenu(e){
e.preventDefault();
e.stopPropagation();
mouseX=parseInt(e.clientX-offsetX);
mouseY=parseInt(e.clientY-offsetY);
// hit-test each of your objects
// if the mouse is inside an object
// then display your context menu
}
Then iterate through your objects and test if the mouse is inside any object.
If it is inside an object then display your context menu.
There are many google examples of presenting the actual context menu. Here's one: