claudio.piffer Posted June 13, 2021 Share Posted June 13, 2021 Hi, I would like to manage the browser zoom with the uniTrakBar component. When the app starts I would like it to be set to 100% and once logged in allow the user to zoom up to 150% using the option in the app interface I tried to play with the DesktopViewport.InitialScale property by setting various values but nothing happens. Where am I doing wrong? Is it possible, via code, to limit the browser zoom to a minimum and maximum value? The application is desktop (not mobile) and I am running the tests in Chrome and Firefox Thank you very much Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 13, 2021 Share Posted June 13, 2021 8 hours ago, claudio.piffer said: I would like to manage the browser zoom with the uniTrakBar component. When the app starts I would like it to be set to 100% and once logged in allow the user to zoom up to 150% using the option in the app interface I tried to play with the DesktopViewport.InitialScale property by setting various values but nothing happens. Where am I doing wrong? Is it possible, via code, to limit the browser zoom to a minimum and maximum value? The application is desktop (not mobile) and I am running the tests in Chrome and Firefox Hello, "I would say not possible in most browsers, at least not without some additional plugins. And in any case I would try to avoid relying on the browser's zoom as the implementations vary (some browsers only zoom the fonts, others zoom the images, too etc). Unless you don't care much about user experience." https://stackoverflow.com/questions/1055336/changing-the-browser-zoom-level Draft: var currFFZoom = 1; var currIEZoom = 100; if (Ext.browser.name == 'Firefox') { var step = 0.02; currFFZoom += step; $('body').css('MozTransform', 'scale(' + currFFZoom + ')'); } else { var step = 2; currIEZoom += step; $('body').css('zoom', ' ' + currIEZoom + '%'); } ... 1 Quote Link to comment Share on other sites More sharing options...
风吹小机机 Posted September 3, 2022 Share Posted September 3, 2022 On 6/14/2021 at 1:40 AM, Sherzod said: Hello, "I would say not possible in most browsers, at least not without some additional plugins. And in any case I would try to avoid relying on the browser's zoom as the implementations vary (some browsers only zoom the fonts, others zoom the images, too etc). Unless you don't care much about user experience." https://stackoverflow.com/questions/1055336/changing-the-browser-zoom-level Draft: var currFFZoom = 1; var currIEZoom = 100; if (Ext.browser.name == 'Firefox') { var step = 0.02; currFFZoom += step; $('body').css('MozTransform', 'scale(' + currFFZoom + ')'); } else { var step = 2; currIEZoom += step; $('body').css('zoom', ' ' + currIEZoom + '%'); } ... According to this setting, you can't pull in full screen As shown in the figure: Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 3, 2022 Share Posted September 3, 2022 11 minutes ago, 风吹小机机 said: According to this setting, you can't pull in full screen I couldn't reproduce. Works for me. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.