public
Created

resize kendo splitter to full vertical height of window

  • Download Gist
resize.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
$("#vertical").kendoSplitter({
orientation: "vertical",
panes: [
{ collapsible: false, resizable: false, size: "100px" },
{ collapsible: false },
{ collapsible: false, resizable: false, size: "100px" }
]
});
 
$("#horizontal").kendoSplitter({
panes: [
{ collapsible: true },
{ collapsible: false },
{ collapsible: true }
]
});
 
$(window).resize(function() {
resizeSplitter()
});
 
var resizeSplitter = function() {
var topHeight = 100;
var bottomHeight = 100;
var centerHeight = $(window).height() - (topHeight + bottomHeight);
 
var splitter = $("#vertical").data("kendoSplitter");
splitter.size("#topPane", topHeight + "px");
splitter.size("#middlePane", centerHeight + "px");
splitter.size("#bottomPane", bottomHeight + "px");
splitter.trigger("resize")
};

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.