From 2d78a2ccaf1b8df7dfb4ac7b0a519a7f407a596e Mon Sep 17 00:00:00 2001 From: edoardo bianchi Date: Sun, 5 May 2013 11:41:42 +0200 Subject: [PATCH] Options to set explicitly wrapper width and height. Fixes #45 --- src/swipeview.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/swipeview.js b/src/swipeview.js index 56b0a00..2f1d4a9 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -162,8 +162,8 @@ var SwipeView = (function (window, document) { }, refreshSize: function () { - this.wrapperWidth = this.wrapper.clientWidth; - this.wrapperHeight = this.wrapper.clientHeight; + this.wrapperWidth = this.options.wrapperWidth || this.wrapper.clientWidth; + this.wrapperHeight = this.options.wrapperHeight || this.wrapper.clientHeight; this.pageWidth = this.wrapperWidth; this.maxX = -this.options.numberOfPages * this.pageWidth + this.wrapperWidth; this.snapThreshold = this.options.snapThreshold === null ?