The Splitter can now do vertical splitting as well as horizontal.
Also, I’ve implemented minimumSize for the panels.
The HTML for the above is this:
<div id="splitter_wrapper" style="height:200px;border:1px solid #000"> <div id="topleft">top left, minimum height 50px</div> <div id="bottomleft">bottom left, minimum height 100px</div> <div id="right">right, minimum width:50px</div> </div>
and the javascript is this:
var horizontal=new Splitter($("splitter_wrapper"));
var vertical=new Splitter(false,{orientation:1});
vertical.addWidget($("topleft"),{minimumSize:50});
vertical.addWidget($("bottomleft"),{minimumSize:100});
horizontal.addWidget(vertical);
horizontal.addWidget($("right"),{minimumSize:50});
The Splitter class requires Mootools.
Demo:http://verens.com/archives/2007/07/25/a-few-splitter-enhancements/
Download: http://verens.com/demos/splitter/splitter.js
Source: http://verens.com/archives/2007/07/25/a-few-splitter-enhancements/

Related Listings:
No comments yet.
RSS feed for comments on this post. TrackBack URL