From 987b87f7ffbca99a6eb4e26dd2334e6853d299a2 Mon Sep 17 00:00:00 2001 From: Jay Knapp Date: Mon, 17 Feb 2014 15:21:44 -0600 Subject: [PATCH] add optional wrapperWidth, wrapperHeight parameters --- 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 ?