On a sprite element, I am NOT able to capture the right click mouse event.
I am able to capture the click, mouseover, mouseout events.
I tried catching the mouse down event and checking if e.button = '2', but e.button returns undefined.
What am I missing ?
Code:
var sprite = new Ext.draw.Sprite({
id: nodeId,
type: 'image',
src: imgUrl,
width: 50,
height: 50,
x: xPos,
y: yPos,
fill: '#0f0',
//draggable: true,
listeners: {
click: function(e) {
},
rightclick: function(e) {
},
contextmenu: function(e) {
},
mousedown: function(e) {
e.button;
}
}
});