Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed orientation change in master detail sample

  • Loading branch information...
commit 807486e8fd676b0d0ccdf99811a0d09bda352f33 1 parent 2b3a3ac
Tim Neil authored
Showing with 8 additions and 3 deletions.
  1. +8 −3 samples/js/masterDetail.js
View
11 samples/js/masterDetail.js
@@ -34,14 +34,19 @@ function masterDetail_initialLoad(element) {
var height = masterDetail_getHeight()+'px';
element.getElementById('master').style.height = height;
element.getElementById('details').style.height = height;
+
// Set our resize listener
window.addEventListener('resize', masterDetail_onResize,false);
}
function masterDetail_onResize() {
- var height = masterDetail_getHeight()+'px';
- document.getElementById('master').style.height = height;
- document.getElementById('details').style.height = height;
+ var height = masterDetail_getHeight()+'px',
+ master = document.getElementById('master'),
+ details = document.getElementById('details');
+ master.style.height = height;
+ details.style.height = height;
+ master.refresh();
+ details.refresh();
}
function masterDetail_getHeight() {
Please sign in to comment.
Something went wrong with that request. Please try again.