Permalink
Browse files

Update to use the largest of availWidth or availHeight to handle ios …

…device rotation
  • Loading branch information...
turnertime committed Mar 29, 2012
1 parent acc7e3b commit 1e32701e44d116509744e240349efbe1795cb233
Showing with 3 additions and 1 deletion.
  1. +3 −1 virtualist.js
View
@@ -97,7 +97,9 @@ window.Virtualist = window.Virtualist || (function (document, HTMLElement, scree
element: settings.element,
// the size of the viewport (default: screen.avail[Height|Width])
- explicitSize: (typeof settings.explicitSize === "number") ? Math.ceil(Math.max(1, settings.explicitSize)) : (settings.isHorizontal ? screen.availWidth : screen.availHeight),
+ explicitSize: (typeof settings.explicitSize === "number")
+ ? Math.ceil(Math.max(1, settings.explicitSize))
+ : (screen.availWidth > screen.availHeight ? screen.availWidth : screen.availHeight),
// specifies orientation of the list (either vertical or horizontal)
isHorizontal: !!settings.isHorizontal,

0 comments on commit 1e32701

Please sign in to comment.