Jump to content

How to zoom in / out to a form


asapltda

Recommended Posts

Maybe if you see the resolution of your device and dynamically resize your form?

 
To control the zoom on a smartphone add on In UniServerModule.custommeta
help something
 
<meta content='True' name='HandheldFriendly' />
<meta content='width=device-width; initial-scale=1.0; maximum-scale=2.0; user-scalable=1;' name='viewport' />
 
 
MainForm.Script
 
 
 
if (document.body) {
   document.body.addEventListener('touchmove',function(event){
  event.preventDefault();
   },false);
}

 

 

Link to comment
Share on other sites

  • 1 year later...

1. Although Extjs is a web framework it's not intended to be run at smartphone/taplets, because of the user experience will be difficult interacting with your app, so if you insist to use it here a technique how you can improve it.

 

2. I have used this technique before for displaying adds based on js animation because smartphones in general doesn't support flash, so we have html and js as a good alternative, but the problem is: smartphones and tablets has a variant screen size and variant resolution (as your issue) so we had to build a custom add animation for every device (sounds silly)  we didn't, we just wrapped our add main container with a div and we did a zoom (scale) using css and I have to say it was a very good solution for us (and for you).

 

3. In few words scale your form dynamically as user's screen or display resolution, how? use js 'resize' function+jquery:

$(window).resize(function() {
   var a=$('#tbllogo').width();//screen width  
   a/=980;//aspect ration   
   if(a>1) a=1;//optionally- if you don't want to make you window bigger than original size
   $(".div_add_max").css("-webkit-transform","scale("+a.toString()+")");//use $(youform.id)
});

4. You may see it online for website in this link: http://adan.co.il/pindex.php Try to resize your browser window and see how the content changes depending on window size.

 

5. here a screenshot :

 

zm1.png

 

 

 

zm2.png

 

 

I hope this will help you

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...