Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium Member
    Join Date
    Mar 2011
    Posts
    54
    Answers
    2
    Vote Rating
    1
    maikhorma is on a distinguished road

      0  

    Default Answered: Zoom features

    Answered: Zoom features


    We have some users with visibility issues and typically run their webapps using the browser's zoom. We are using packager, which doesn't have any default 'zoom' functions. The closest I have found is to use "document.body.style.zoom='125%'".

    The page does zoom, but the viewport doesn't seem to notice. So the extra 25% just flows off the screen on the right and bottom. Re-sizing the window just carries the problem with.

    The only thing I can see is that viewport.setWidth() (& height) could possibly be used to compensate, but any event that causes re-layout will bring back the 'wrong' dimensions.

    Any ideas?

    Thanks in advance.

  2. Have you looked into setting the zoomFactor property of the SDP window?

    http://docs.sencha.com/desktop-packager/1.2/#!/api/Ion.ui.Window-property-zoomFactor

    Disclosure: have never used this property in my own apps, just thought perhaps this would address the problem.

    --Mike

  3. #2
    Sencha - Support Team mike.estes's Avatar
    Join Date
    Mar 2011
    Location
    Redwood City, CA
    Posts
    221
    Answers
    2
    Vote Rating
    9
    mike.estes will become famous soon enough

      1  

    Default


    Have you looked into setting the zoomFactor property of the SDP window?

    http://docs.sencha.com/desktop-packager/1.2/#!/api/Ion.ui.Window-property-zoomFactor

    Disclosure: have never used this property in my own apps, just thought perhaps this would address the problem.

    --Mike

  4. #3
    Sencha Premium Member
    Join Date
    Mar 2011
    Posts
    54
    Answers
    2
    Vote Rating
    1
    maikhorma is on a distinguished road

      0  

    Default


    Awesome, my fault for looking at the 1.0 documentation not 1.2.

  5. #4
    Sencha Premium Member
    Join Date
    Mar 2011
    Posts
    54
    Answers
    2
    Vote Rating
    1
    maikhorma is on a distinguished road

      0  

    Default Implemented it

    Implemented it


    It works quite well, a little jerky on the move but who cares for the functionality. If anyone's interested, here are the basic config options:
    Code:
    Ext.create('widget.slider',{
        tipText: function(thumb) {
            //make it show up as a percent
            return Ext.String.format('{0}%',thumb.value);
        },
        fieldLabel: 'Zoom',
        value: 100,
        increment: 5,
        maxValue: 150,
        minValue: 100,
        width: 100,
        labelWidth: 30,
        listeners: {
            changecomplete: function(slider,newValue,thumb,eOpts){
                Ion.ui.mainWindow.zoomFactor=newValue/100;
            }
        }
    });

Thread Participants: 1