The resize event

5 posts, 0 answers
  1. Jacob
    Jacob avatar
    23 posts
    Member since:
    Oct 2011

    Posted 01 Nov 2011 Link to this post

    Hi!

    It seems like the resize event for Splitter does not supply the pane that got resized, as documentation says.

    E.g. a collapse event gives this to work with:
    Object { pane=div#leftPane.k-pane, preventDefault=function(), isDefaultPrevented=function()}

    While resize only this (note the absence of "pane"):
    Object { preventDefault=function(), isDefaultPrevented=function()}


    How can I get the size of pane and which pane got resized without this? Am I missing something?

    Thanks!
    /Jacob
  2. Dimo
    Admin
    Dimo avatar
    8330 posts

    Posted 01 Nov 2011 Link to this post

    Hello Jacob,

    Actually the documentation is not correct in this case. The Splitter's Resize event involves more than one pane (practically all of them), so you can't get only one as an event argument. If you need to find out the new pane sizes, use standard jQuery selectors and methods, such as outerWidth() or width().

    Greetings,
    Dimo
    the Telerik team
    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. Ellin
    Ellin avatar
    1 posts
    Member since:
    Dec 2011

    Posted 09 Dec 2011 Link to this post

    That isn't working for me. The event returns the old sizes. Not the new ones.

    function toolboxes(e){
    console.log(e);
    $(".toolbox").each(function() {
    $(this).width( $(this).parent().width() + "px" );
    console.log($(this).parent().attr("id") + " = " + $(this).parent().width() )
    });
    }

  5. Dimo
    Admin
    Dimo avatar
    8330 posts

    Posted 14 Dec 2011 Link to this post

    Hello Ellin,

    Please use setTimeout to get the new panes' dimensions. Currently the reisize event is triggered by the Kendo Resizable object, which is also used by the Splitter to readjust its layout. As a result, the defined event handler is executed before the Splitter has set the new pane sizes. We will think whether and how to change this behavior in the future to make it easier for the developer.

    Regards,
    Dimo
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. Joe
    Joe avatar
    6 posts
    Member since:
    Dec 2011

    Posted 02 Sep 2012 Link to this post

    Just to leave this thread closed: kendoui.web.2012.2.710.open-source (and forward I suppose) has an event called layoutChange which seems to get the sizes correctly.

    Joe
    TSolucio
Back to Top
Kendo UI is VS 2017 Ready