From 0678a3eea639702d54327f0c2e382d075f74fdbd Mon Sep 17 00:00:00 2001 From: Minkyu Kang Date: Fri, 22 Feb 2013 17:29:04 +0900 Subject: [PATCH] scrollview: add function for getting width of view The virtual grid needs this function for setting width of view Change-Id: I3ab619a22a80eb39fbd130bda9b48fc04bbfbdfe --- src/js/jquery.mobile.tizen.scrollview.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/js/jquery.mobile.tizen.scrollview.js b/src/js/jquery.mobile.tizen.scrollview.js index cadff6d..a82745c 100644 --- a/src/js/jquery.mobile.tizen.scrollview.js +++ b/src/js/jquery.mobile.tizen.scrollview.js @@ -76,6 +76,10 @@ define( [ ], function ( ) { return this._$view.height(); }, + _getViewWidth: function () { + return this._$view.width(); + }, + _makePositioned: function ( $ele ) { if ( $ele.css("position") === "static" ) { $ele.css( "position", "relative" ); @@ -144,7 +148,7 @@ define( [ ], function ( ) { if ( ht ) { c = this._$clip.width(); - v = this._$view.width(); + v = this._getViewWidth(); if ( (( this._sx === 0 && speedX > 0 ) || ( this._sx === -(v - c) && speedX < 0 )) && @@ -862,7 +866,7 @@ define( [ ], function ( ) { this.scrollTo( 0, this._sy, this.options.overshootDuration ); break; case direction.right: - this.scrollTo( -( this._$view.width() - this._$clip.width() ), this._sy, + this.scrollTo( -( this._getViewWidth() - this._$clip.width() ), this._sy, this.options.overshootDuration ); break; } -- 2.7.4