View Full Version : pich zoom on single image - i need pinch event?

13 Sep 2011, 4:20 AM

I have a panel, which loads an image in its html method. I want to be able to pich / zoom on that image but i can't get it to work. This is what i have so far:

html: '<div id="olol"></div>',
id: 'myimage',
afterrender: function() {
var img = Ext.get('olol'); // ID of the DIV

img.on('pinch', function(e){


The problem is that the 'pinch' event never is executed? When i pinch i expect to see an alert() but it's not showing anything at all.

Another thing to note, the actual image is placed later at some point in the DIV.
So basically the afterrender() method is already fired when there's only an empty DIV. With no image in it. I'm not sure if that makes any difference??

Anyway, i hope someone can help me out with this. I just want to have a pinch/zoom on a single image. But i can't even get the pinch event to work.

Any ideas??

13 Sep 2011, 9:46 PM
Weird, that code looks right to me. I know it doesn't help you right now, but Touch 2's new event system makes this stuff a lot more robust, and we'll be shipping a beta very shortly

14 Sep 2011, 12:54 AM
If you are running on Android the pinch gesture is not available at javascript level so is not detected.