Resized event (resize ends)

6 posts, 1 answers
  1. Matjaz
    Matjaz avatar
    94 posts
    Member since:
    Jun 2014

    Posted 22 Jul 2014 Link to this post

    Is there a resized or resizeEnd event on window?
    I am saving width and height in localStorage, but I want to do that only when window is resized, not continuously when window is resizing.
  2. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 22 Jul 2014 Link to this post

    Hello Matjaz,

    The resize event is triggered once the window has been resized.

    Regards,
    Alex Gyoshev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Matjaz
    Matjaz avatar
    94 posts
    Member since:
    Jun 2014

    Posted 22 Jul 2014 Link to this post

    This is not true, or I didn't explain enough.
    For every pixel that windows is resized, event is called. I want to call it when LeftMouseUp is fired.

    I need to do some heavy operation and only when user finished resizing.

    dojo example
  5. Answer
    Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 22 Jul 2014 Link to this post

    Hello Matjaz,

    Indeed, it appears that the online docs are misleading in that regard. I have logged this for implementation; see this dojo snippet for a work-around.

    Regards,
    Alex Gyoshev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  6. Matjaz
    Matjaz avatar
    94 posts
    Member since:
    Jun 2014

    Posted 22 Jul 2014 in reply to Alex Gyoshev Link to this post

    Thanks.
  7. Barry P
    Barry P avatar
    13 posts
    Member since:
    Aug 2006

    Posted 07 Sep 2015 in reply to Matjaz Link to this post

    I ran into this issue, too.  Only I was calling an ajax function to store window information on the server.

    I worked around this by using a timeout.  It effectively waits until there is no resize for 1/2 second.

    01.var _resizeTimeout = null;
    02. 
    03.window.bind("resize", function (e) {
    04. 
    05.    clearTimeout(_resizeTimeout);
    06.    _resizeTimeout = setTimeout(function () {
    07.        // ajax call to save window information on the server.
    08.    }, 500);
    09. 
    10.});

Back to Top
Kendo UI is VS 2017 Ready