jQuery UI Widgets Forums Plugins Response resize method

This topic contains 6 replies, has 2 voices, and was last updated by  Franck 5 years, 9 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • resize method #59016

    Franck
    Participant

    Hello There,

    when you use the method resize() and play with the Adaptive view of your browser (developper tools, adaptive view options).
    You have many calls to this method with a progressive changes of the viewPort.width and height value.
    But you don’t know exactly when the resize() is finish to have the final values after the resize is finished.

    Example :

    <div id=”resize”></div>

    var response = new $.jqx.response();

    response.resize(function(){
    var html = “<p>” + “width : ” + response.viewPort.width + ” height : ” + response.viewPort.height + “</p>”;
    $(“#resize”).append(html) ;

    })

    Hope that you understand what I mean.

    Best regards,
    Franck Beugin

    resize method #59020

    Peter Stoev
    Keymaster

    Hi Franck Beugin,

    The event is raised when something is resized. We do not know and cannot know when the resize has finished.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    resize method #59032

    Franck
    Participant

    Hi Peter and thank you for your answer. I need your experience.

    I use docking with 3 panels of 3 windows . Depending the width of the viewport i set up the horizontal mode or vertical mode.
    when it is displayed on a tablet or smartphone, i know when the page is loaded the width of the viewPort but when the tablet/smartphone move to vertical or hozintal layout, i need to know this change to change the “vertical or horizontal mode” of the docking.

    Any idea how to do ?

    resize method #59038

    Peter Stoev
    Keymaster

    Hi Franck,

    You can try the below:

    $(window).on("orientationchange",function(){
      alert("The orientation has changed!");
    });

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    resize method #59116

    Franck
    Participant

    Thank you so much Peter, you save me…

    However, is it normal that after a change of orientation, the response.refresh gives no change of the viewport

    var response = new $.jqx.response();

    $(window).on(“orientationchange”,function(){
    alert(“The orientation has changed!”);
    response.refresh() ;

    });

    resize method #59122

    Peter Stoev
    Keymaster

    Hi Franck,

    What kind of change should have? The plug-in displays what your browser has as information.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    resize method #59141

    Franck
    Participant

    Hi peter,

    I understand. I would only expected that the viewPort.with and height have other values after a change of orientation.
    that seems for me logical. But never mind, I will change myself the value.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.