jQuery UI Widgets › Forums › Plugins › Response › resize method
This topic contains 6 replies, has 2 voices, and was last updated by Franck 10 years, 1 month ago.
-
Authorresize method Posts
-
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 BeuginHi 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 StoevjQWidgets Team
http://www.jqwidgets.comHi 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 ?
Hi Franck,
You can try the below:
$(window).on("orientationchange",function(){ alert("The orientation has changed!"); });
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/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() ;});
Hi Franck,
What kind of change should have? The plug-in displays what your browser has as information.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi 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. -
AuthorPosts
You must be logged in to reply to this topic.