I have been trying to add a touch event listener to my app in Sencha touch 2.3.1, but the listener is not added.
This is my code overview :
var drawComponent = new Ext.draw.Component();
var myCircle1 = drawComponent.getSurface('main').add({
id: 'circle1',
type: 'circle',
fill: '#79BB3F',
radius: 100,
cx: 100,
cy: 100
});
myCircle1.addListener('tap',function(){
alert('Touched');
});
Through the console, when I check for myCircle1.getListeners(), it returns null.
Basically I want to display a lot of sprites (circles and rectangles) with predefined positions and add an tap event so that I can display various information.
I can do them with just buttons as well. But is there way where I can position the buttons at various positions(x,y) instead of hbox or vbox layouts?
Any direction would be of great help. Cheers.
Vignesh
Ext.draw.Component does not have a tap event.
see the Events
I have not worked with Ext.draw.Component a lot, but it might be possible to cast the click event on the dom to the component.
something like this.