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
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
0
Hello Xiaodong,
Alex Gyoshev
Telerik
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
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
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.
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
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!