function SplitScreen (nonScrollingRegionId, scrollingRegionId) { // store references to the two regions this.nonScrollingRegion = document.getElementById(nonScrollingRegionId); this.scrollingRegion = document.getElementById(scrollingRegionId); // set the scrolling settings document.body.style.margin = "0px"; document.body.style.overflow = "hidden"; this.scrollingRegion.style.overflow = "auto"; // fix the size of the scrolling region this.resize(null); // add an event handler to resize the scrolling region when the window is resized registerEventHandler(window, 'resize', getInstanceDelegate(this, "resize")); } SplitScreen.prototype.resize = function(e) { var height = document.body.clientHeight - this.nonScrollingRegion.offsetHeight; if (height > 0) { this.scrollingRegion.style.height = height; } else { this.scrollingRegion.style.height = 0; } this.scrollingRegion.style.width = document.body.clientWidth; }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 7341 | Erik Purins |
p4.net --- pull p4.net#head |
||
//guest/shawn_hladky/P4.Net/release/1.0/doc/html/scripts/SplitScreen.js | |||||
#1 | 6106 | Shawn Hladky | P4.Net: Branching release 1.0 | ||
//guest/shawn_hladky/P4.Net/main/doc/html/scripts/SplitScreen.js | |||||
#1 | 6105 | Shawn Hladky | P4.Net: Updating documentation output to sandcastle. |