Skip to content

Commit

Permalink
Fix converting values like 'auto' in getScalar()
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Vogel committed Aug 27, 2012
1 parent 96c4487 commit 328aa7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/jquery.fancybox.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
return (el && !(el.style.overflow && el.style.overflow === 'hidden') && ((el.clientWidth && el.scrollWidth > el.clientWidth) || (el.clientHeight && el.scrollHeight > el.clientHeight)));
},
getScalar = function(value, dim) {
var value_ = parseInt(value, 10);
var value_ = ~~value; // Convert to int, default to 0

if (dim && isPercentage(value)) {
value_ = F.getViewport()[ dim ] / 100 * value_;
Expand Down

0 comments on commit 328aa7f

Please sign in to comment.