pane which has been dragged will not be resized on window resize event.

7 posts, 0 answers
  1. Xiaodong
    Xiaodong avatar
    1 posts
    Member since:
    May 2014

    Posted 04 Jun 2014 Link to this post

    by default ,changing window's size will resize all the panes of splitter ,it worked well,

    but if I  adjust a pane size by dragging splitbar before, panes will not be able to resize themself on window resize event.

    any solution for this problem? thanks.

    demo:
    http://plnkr.co/edit/ZxBSjet64mI90FALXLCr?p=preview

    <div id="main-splitter">
    <div></div>
    <div></div>
    </div>
    <script>
          $(function(){
            $("#main-splitter").kendoSplitter();
          });
          $(window).on("resize",function(){
            kendo.resize($("main-splitter"));
          })
        </script>
  2. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 06 Jun 2014 Link to this post

    Hello Xiaodong,

    Once you resize the pane with a splitbar, its size is remembered in pixel units. If that is not desirable, you can bind to the splitter resize event and convert the pixel units to percentages -- so the pane proportions will remain the same when resizing the window.

    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. Nisarg
    Nisarg avatar
    18 posts
    Member since:
    Jan 2015

    Posted 09 Feb 2015 Link to this post

    Hi Alex,

    How do you suggest I do this? As the size method of the splitter causes the resize event, so I am not able to use that, and If I manually try to change the css of the .k-panes, some panes have +/- error width, as the percentage values are not integral. 

    Thanks in advance,
    Nisarg
  5. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 10 Feb 2015 Link to this post

    Hello Nisarg,

    You can accomplish this via a flag. See this Dojo snippet for a working example.

    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. Nisarg
    Nisarg avatar
    18 posts
    Member since:
    Jan 2015

    Posted 10 Feb 2015 in reply to Alex Gyoshev Link to this post

    Thanks, that will help.
  7. Nisarg
    Nisarg avatar
    18 posts
    Member since:
    Jan 2015

    Posted 10 Feb 2015 Link to this post

    Hi Alex, 

    Another issue I am having on resizing the browser window is that, the min config of the panes is ignored, which causes my page to have unwanted results. 
  8. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 11 Feb 2015 Link to this post

    Hello Nisarg,

    Indeed, there are problems with this approach, and this is why it is not officially supported. The provided solution is meant to be a starting point, and you can adjust it to your needs.

    Regards,
    Alex Gyoshev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready