- // TODO use scrollLeft, scrollTop\r
- function X_UI_ScrollBox_translate( that, x, y, opt_time, opt_easing, opt_release ){\r
- \r
- opt_time = 0 <= opt_time ? opt_time : 0;\r
- opt_easing = opt_easing === '' ? '' : opt_easing || 'circular';\r
- opt_release = 0 <= opt_release ? opt_release : 300;\r
- \r
- that.xnodeSlider.animate(\r
- {\r
- x : that.scrollX,\r
- y : that.scrollY\r
- },\r
- {\r
- x : x,\r
- y : y\r
- },\r
- opt_time, opt_easing, opt_release\r
- );\r
- \r
- that.scrollX = x;\r
- that.scrollY = y;\r
- \r
- if( that.indicators ){\r
- for( i = that.indicators.length; i--; ){\r
- that.indicators[ i ].updatePosition();\r
- };\r
- };\r
- };\r
+// TODO use scrollLeft, scrollTop\r
+function X_UI_ScrollBox_translate( that, x, y, opt_time, opt_easing, opt_release ){\r
+ var scrollBoxH = that.fontSize * that.boxHeight,\r
+ scrollBoxW = that.fontSize * that.boxWidth,\r
+ indicatorH, indicatorW;\r
+ \r
+ opt_time = 0 <= opt_time ? opt_time : 0;\r
+ opt_easing = opt_easing === '' ? '' : opt_easing || 'circular';\r
+ opt_release = 0 <= opt_release ? opt_release : 300;\r
+ \r
+ console.log( 'scr ' + y );\r
+ \r
+ if( !XUI_ScrollBox_useCSSP ){\r
+ that.xnode[ 'animate' ]({\r
+ 'from' : {\r
+ scrollX : -that.scrollX,\r
+ scrollY : -that.scrollY\r
+ },\r
+ 'to' : {\r
+ scrollX : -x,\r
+ scrollY : -y\r
+ },\r
+ 'duration' : opt_time,\r
+ 'easing' : opt_easing\r
+ }); \r
+ } else {\r
+ that.xnodeSlider[ 'animate' ]({\r
+ 'from' : {\r
+ x : that.scrollX,\r
+ y : that.scrollY\r
+ },\r
+ 'to' : {\r
+ x : x,\r
+ y : y\r
+ },\r
+ 'duration' : opt_time,\r
+ 'easing' : opt_easing,\r
+ 'lazyRelease' : opt_release\r
+ }); \r
+ };\r