PDA

View Full Version : Pinch in/Pinch out (Zoom in/Zoom out) in ST2



senchaSaurav
16 Apr 2012, 11:30 AM
Hi,
How can I achieve Pinch in/ Pinch out i.e Zoom in/ Zoom out in html content in ST2?
Not any single element but through out the app.. Any example please :-/

mrsunshine
17 Apr 2012, 3:52 AM
there is an option to activate pinch zoom
http://docs.sencha.com/touch/2-0/#!/api/Ext.viewport.Default-cfg-preventZooming

which would zoom the hole app

senchaSaurav
17 Apr 2012, 11:09 AM
Thanks alot.
I am trying to do as mentioned below

Ext.Viewport.add({xtype:'mainview',preventZooming:false});

Is this the correct way?

aoathout
18 Apr 2012, 3:15 PM
I think you want something like this:



Ext.application({
viewport: {
preventZooming: false
},

.....
});

senchaSaurav
24 Apr 2012, 8:36 AM
Below code is

Ext.application({ name: 'PECMobile',
viewport:{
preventZooming:false
},
requires: [
'Ext.MessageBox'
],


stores: ['Costs','InvoiceInfo','PaymentInfo'],
models:['CostModal','InvoiceInfoModal','PaymentInfoModal'],
glossOnIcon:true,

icon: {
57: 'resources/icons/Icon.png',
72: 'resources/icons/Icon~ipad.png',
114: 'resources/icons/Icon@2x.png',
144: 'resources/icons/Icon~ipad@2x.png'
},

phoneStartupScreen: 'resources/loading/Homescreen.jpg',
//tabletStartupScreen: 'resources/loading/Homescreen~ipad.jpg',


profiles: ['Tablet'],


onUpdated: function() {
Ext.Msg.confirm(
"Application Update",
"This application has just successfully been updated to the latest 0.0.8 beta version. Reload now?",
function() {
window.location.reload();
}
);
}
});

But still it not working .. even after native iOS packaging. :-/