This is a migrated thread and some comments may be shown as answers.

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

6 Answers 31 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Xiaodong
Top achievements
Rank 1
Xiaodong asked on 05 Jun 2014, 02:25 AM
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>

6 Answers, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 06 Jun 2014, 08:33 AM
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!
 
0
Nisarg
Top achievements
Rank 1
answered on 09 Feb 2015, 08:55 PM
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
0
Alex Gyoshev
Telerik team
answered on 10 Feb 2015, 09:59 AM

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!
 
0
Nisarg
Top achievements
Rank 1
answered on 10 Feb 2015, 02:37 PM
Thanks, that will help.
0
Nisarg
Top achievements
Rank 1
answered on 10 Feb 2015, 03:39 PM
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. 
0
Alex Gyoshev
Telerik team
answered on 11 Feb 2015, 12:09 PM

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!
 
Tags
Splitter
Asked by
Xiaodong
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Nisarg
Top achievements
Rank 1
Share this question
or