OSDN Git Service

Version 0.6.140, fix size detection @IE.
[pettanr/clientJs.git] / 0.6.x / js / 20_ui / 15_ScrollBox.js
index cd5e4f4..81c1958 100644 (file)
@@ -171,8 +171,8 @@ function X_UI_ScrollBox_onLayoutComplete( e ){
        // scroll の停止、GPU の解除\r
        var font = this.fontSize = this._containerXNode.call( 'fontSize' );\r
        \r
-       this.maxScrollX = ( this.boxWidth  - this._containerNode.boxWidth ) * font | 0;\r
-       this.maxScrollY = ( this.boxHeight - this._containerNode.boxHeight ) * font | 0;\r
+       this.maxScrollX = ( this.boxWidth  - this._containerNode.boxWidth ) * font;\r
+       this.maxScrollY = ( this.boxHeight - this._containerNode.boxHeight ) * font;\r
 \r
        this.hasHScroll = this.scrollXEnabled && this.maxScrollX < 0;\r
        this.hasVScroll = this.scrollYEnabled && this.maxScrollY < 0;\r
@@ -234,14 +234,14 @@ function X_UI_ScrollBox_onLayoutComplete( e ){
                                        y : that.scrollY\r
                                },\r
                                {\r
-                                       x : x | 0,\r
-                                       y : y | 0\r
+                                       x : x,\r
+                                       y : y\r
                                },\r
                                opt_time, opt_easing, opt_release\r
                        );\r
                        \r
-                       that.scrollX = x | 0;\r
-                       that.scrollY = y | 0;\r
+                       that.scrollX = x;\r
+                       that.scrollY = y;\r
                        \r
                        if( that.indicators ){\r
                                for( i = that.indicators.length; i--; ){\r
@@ -300,6 +300,10 @@ function X_UI_ScrollBox_onMove( e ){
        if( !this.scrollEnabled || e.pointerType !== this.initiated ){\r
                return ret;\r
        };\r
+       \r
+       if( e.buttons !== 1 ){\r
+               return X_UI_ScrollBox_onEnd.call( this, e );\r
+       };\r
 \r
        // gpu の用意\r
        if( !this._containerXNode[ '_anime' ] ){\r