• R/O
  • HTTP
  • SSH
  • HTTPS

clientJs: Commit

クライアント側 js 開発用


Commit MetaInfo

Revision3d10dbbb167c89638f3bea6c267de8763274d30c (tree)
Time2016-01-08 11:39:39
Authoritozyun <itozyun@user...>
Commiteritozyun

Log Message

Version 0.6.206, update X.Node.Anime, bug fixes X.HTMLAudio@getActualCurrentTime.

Change Summary

Incremental Difference

--- a/0.6.x/js/01_core/02_XUA.js
+++ b/0.6.x/js/01_core/02_XUA.js
@@ -30,7 +30,7 @@ var X_UA = X[ 'UA' ] = {},
3030
3131 if( sys.indexOf( 'iP' ) === 0 ){
3232
33- v = dua.split( 'OS ' )[ 1 ].split( '_' );
33+ v = dav.split( 'OS ' )[ 1 ].split( '_' );
3434 i = window.devicePixelRatio === 1;
3535 /**
3636 * @alias X.UA.iOSMajor
@@ -51,7 +51,7 @@ var X_UA = X[ 'UA' ] = {},
5151 * @alias X.UA.iOS
5252 * @type {number}
5353 */
54- X_UA[ 'iOS' ] = X_UA[ 'iOSMajor' ] + X_UA[ 'iOSMinor' ] / 10;
54+ X_UA[ 'iOS' ] = X_UA[ 'iOSMajor' ] + X_UA[ 'iOSMinor' ] / 10;
5555
5656 // 4:3 model
5757 v = screen.width === screen.height * 1.5 || screen.width * 1.5 === screen.height;
@@ -123,6 +123,7 @@ var X_UA = X[ 'UA' ] = {},
123123 };
124124 //alert( 'iPod touch ' + ( X_UA[ 'iPod_3' ] ? '3以下' : X_UA[ 'iPod_4' ] ? '4以下' : '5以上' ) );
125125 };
126+ // TODO iPhone Simulator
126127
127128 console.log( '>> iOS : ' + X_UA[ 'iOS' ] );
128129 } else
@@ -458,7 +459,7 @@ var X_UA = X[ 'UA' ] = {},
458459 X_UA[ 'MacIE' ] = true;
459460 };
460461
461- if( 0 < dua.toLowerCase().indexOf( 'iemobile' ) || X_UA[ 'WinCE' ] ){
462+ if( 0 < dua.indexOf( 'IEMobile' ) || X_UA[ 'WinCE' ] ){
462463 /**
463464 * @alias X.UA.IEMobile
464465 * @type {boolean}
@@ -466,7 +467,7 @@ var X_UA = X[ 'UA' ] = {},
466467 X_UA[ 'IEMobile' ] = true;
467468 };
468469
469- if( 0 < dua.toLowerCase().indexOf( 'windows phone' ) || 0 < dav.indexOf( 'ZuneWP' ) ){
470+ if( 0 < dua.indexOf( 'Windows Phone' ) || 0 < dav.indexOf( 'ZuneWP' ) ){
470471 /**
471472 * @alias X.UA.WinPhone
472473 * @type {boolean}
--- a/0.6.x/js/02_dom/06_XNodeCSS.js
+++ b/0.6.x/js/02_dom/06_XNodeCSS.js
@@ -489,14 +489,14 @@ function X_Node_CSS_objToIEFilterText( that, opt_css, opt_cssList ){
489489 + params[ 1 ];
490490
491491 //console.log( ow + ' ' + oh )
492- elm.style.left = dx + 'px';
493- elm.style.top = dy + 'px';
492+ elm.style[ params[ 7 ] ] = dx + 'px'; // left or right
493+ elm.style[ params[ 8 ] ] = dy + 'px'; // top or bottom
494494
495495 //フィルターで回転と拡大縮小を加えます。
496496 return 'progid:DXImageTransform.Microsoft.Matrix(' +
497497 // 'Dx=' + dx +
498498 //',Dy=' + dy +
499- 'M11=' + m11 +
499+ 'M11=' + m11 +
500500 ',M12=' + m12 +
501501 ',M21=' + m21 +
502502 ',M22=' + m22 +
--- a/0.6.x/js/02_dom/10_XNodeAnime.js
+++ b/0.6.x/js/02_dom/10_XNodeAnime.js
@@ -7,14 +7,12 @@ var X_NodeAnime_QUEUE = [],
77
88 X_NodeAnime_hasTransform = !!X_Node_CSS_VENDER_PREFIX[ 'transform' ],
99
10- X_NodeAnime_hasDXTransform = 5.5 <= X_UA[ 'IE' ] && X_UA[ 'IE' ] < 9 && X_UA[ 'ActiveX' ],
10+ X_NodeAnime_hasDXTransform = 5.5 <= X_UA[ 'IE' ] && X_UA[ 'IE' ] < 9 && X_UA[ 'ActiveX' ], // IEHost が 11 の場合不可
1111
1212 /* Opera mobile で translateZ(0) が有効だと XY が 0 0 になる */
1313 /* GPUレイヤーにいる間に要素のコンテンツを変更をすると transitionend が動かなくなるっぽい Mac safari と firefox */
1414 X_NodeAnime_translateZ = X_Node_CSS_VENDER_PREFIX[ 'perspective' ] && !X_UA[ 'OperaMobile' ] && !X_UA[ 'OperaTablet' ] ? ' translateZ(0)' : '',
1515
16- X_NodeAnime_transitionProps = X_NodeAnime_hasTransform ? X_Node_CSS_VENDER_PREFIX[ 'transform' ] : 'left,top';
17-
1816 /*
1917 * phase:
2018 * 0: アニメーション無
@@ -27,7 +25,7 @@ var X_NodeAnime_QUEUE = [],
2725 * 7: アニメーション中
2826 */
2927
30-var X_NODE_ANIME_RESET = 1,
28+ X_NODE_ANIME_RESET = 1,
3129 X_NODE_ANIME_STAY_GPU = 2,
3230
3331 X_NodeAnime_DEFAULT = {
@@ -47,7 +45,7 @@ var X_NODE_ANIME_RESET = 1,
4745 scrollY : NaN, fromScrollY : NaN, toScrollY : NaN //,
4846 //doScroll : false//,
4947 //duration : 0
50- //phase, lazyRelease, easing, follower, releaseNow, inited, progress doScroll, fallbackKind
48+ //phase, lazyRelease, easing, follower, releaseNow, inited, progress, fallback
5149 // fromTime, toTime
5250 };
5351
@@ -144,6 +142,8 @@ function X_Node_animate( obj ){
144142 obj.transform = ( X_Type_isFinite( obj.x ) || X_Type_isFinite( obj.y ) || obj.lazyRelease ) && X_NodeAnime_hasTransform;
145143 obj.doScroll = 0 <= obj.toScrollX || 0 <= obj.toScrollY;
146144 obj.fallback = 0;
145+ obj.altX = fallback & 8 ? 'right' : 'left';
146+ obj.altY = fallback & 16 ? 'bottom' : 'top';
147147
148148 // scale
149149 if( obj.toScaleX !== 1 && obj.fromScaleX !== 1 && obj.toScaleY !== 1 && obj.fromScaleY !== 1 ){
@@ -152,8 +152,8 @@ function X_Node_animate( obj ){
152152 if( X_NodeAnime_hasTransform ){
153153 obj.transform = true;
154154 } else
155- if( X_NodeAnime_hasDXTransform && ( fallback & 16 ) ){ // DX Transform
156- obj.fallback = 16;
155+ if( X_NodeAnime_hasDXTransform && ( fallback & 32 ) ){ // DX Transform
156+ obj.fallback = 32;
157157 } else
158158 if( ( fallback & 4 ) && sameRate ){ // zoom
159159 obj.fallback = 4;
@@ -171,8 +171,8 @@ function X_Node_animate( obj ){
171171 if( X_NodeAnime_hasTransform ){
172172 obj.transform = true;
173173 } else
174- if( X_NodeAnime_hasDXTransform && ( fallback & 16 ) ){ // DX Transform
175- obj.fallback = 16;
174+ if( X_NodeAnime_hasDXTransform && ( fallback & 32 ) ){ // DX Transform
175+ obj.fallback = 32;
176176 };
177177 };
178178
@@ -549,11 +549,11 @@ function X_NodeAnime_updatePosition( xnode, obj, ratio, useGPU ){
549549 };
550550 };
551551 } else
552- if( obj.fallback === 16 ){
553- xnode[ 'css' ]( 'dxtransform', [ x | 0, y | 0, rotate || 0, skewX || 0, skewY || 0, scaleX, scaleY ] );
552+ if( obj.fallback === 32 ){
553+ xnode[ 'css' ]( 'dxtransform', [ x | 0, y | 0, rotate || 0, skewX || 0, skewY || 0, scaleX, scaleY, obj.altX, obj.altY ] );
554554 } else {
555- x === x && xnode[ 'css' ]( 'left', ( x | 0 ) + 'px' );
556- y === y && xnode[ 'css' ]( 'top', ( y | 0 ) + 'px' );
555+ x === x && xnode[ 'css' ]( obj.altX, ( x | 0 ) + 'px' );
556+ y === y && xnode[ 'css' ]( obj.altY, ( y | 0 ) + 'px' );
557557
558558 switch( obj.fallback ){
559559 case 4 :
@@ -570,8 +570,8 @@ function X_NodeAnime_updatePosition( xnode, obj, ratio, useGPU ){
570570
571571 if( obj.doScroll && xnode[ '_rawObject' ] ){
572572 console.log( 'ok ' + ratio );
573- xnode[ '_rawObject' ].scrollLeft = obj.scrollX | 0;
574- xnode[ '_rawObject' ].scrollTop = obj.scrollY | 0;
573+ xnode[ '_rawObject' ].scrollLeft = obj.scrollX | 0;
574+ xnode[ '_rawObject' ].scrollTop = obj.scrollY | 0;
575575 //X_Node_reserveUpdate();
576576 };
577577
--- a/0.6.x/js/07_audio/02_XHTMLAudio.js
+++ b/0.6.x/js/07_audio/02_XHTMLAudio.js
@@ -330,7 +330,7 @@ if( X_Audio_constructor ){
330330 break;
331331
332332 case 'seeked' :
333- if( this._seekingFixON ) this._seekingFixON = false;
333+ if( X_HTMLAudio_seekingFixIOS ) this._seekingFixON = false;
334334 break;
335335
336336 case 'waiting' : // 次のフレームが利用不可のため再生を停止したが、そのフレームがやがて利用可能になると想定している場合に発生
@@ -507,6 +507,7 @@ if( X_Audio_constructor ){
507507 getActualCurrentTime : function(){
508508 return ( X_HTMLAudio_currentTimeFix ?
509509 X_Timer_now() - this._currentFixStart + this._currentFixBegin :
510+ this._seekingFixON ? this._lastCurrentTime * 1000 :
510511 this[ '_rawObject' ].currentTime * 1000 | 0 );
511512 },
512513 /*
Show on old repository browser