From: itozyun Date: Fri, 23 Dec 2016 11:57:18 +0000 (+0900) Subject: Fix the bug of X.NodeAnime. X-Git-Url: http://git.osdn.net/view?p=pettanr%2FclientJs.git;a=commitdiff_plain;h=7d1c004c8114b918978ee730f50a5a4798c85908 Fix the bug of X.NodeAnime. --- diff --git a/0.6.x/js/02_dom/10_XNodeAnime.js b/0.6.x/js/02_dom/10_XNodeAnime.js index c851f8e..9de186d 100644 --- a/0.6.x/js/02_dom/10_XNodeAnime.js +++ b/0.6.x/js/02_dom/10_XNodeAnime.js @@ -525,7 +525,7 @@ function X_NodeAnime_updatePosition( xnode, obj, ratio, useGPU ){ //console.log( 'updatePosition x:' + x + ' gpu:' + !!useGPU ); if( obj.transform ){ - if( ( x === x || y === y ) && ( x !== 0 && y !== 0 ) ){ + if( ( x === x || y === y ) && ( x !== 0 || y !== 0 ) ){ if( X_UA[ 'Safari' ] && X_UA[ 'Windows' ] ){ // http://shinimae.hatenablog.com/entry/2016/01/13/151748 str = ' -webkit-translate(' + ( x | 0 ) + 'px,' + ( y | 0 ) + 'px)'; @@ -538,7 +538,9 @@ function X_NodeAnime_updatePosition( xnode, obj, ratio, useGPU ){ if( skewY < 0 || 0 < skewY ) str += ' skewY(' + skewY + 'deg)'; if( scaleX < 1 || 1 < scaleX ) str += ' scaleX(' + scaleX + ')'; if( scaleY < 1 || 1 < scaleY ) str += ' scaleY(' + scaleY + ')'; + xnode[ 'css' ]( 'transform', ( str ? str.substr( 1 ) : '' ) + ( useGPU ? X_NodeAnime_translateZ : '' ) ); + console.log( xnode.className() + ' ' + str + ' ' + (xnode[ '_flags' ] & X_NodeFlags_DIRTY_CSS) ); if( X_NodeAnime_translateZ ){ if( useGPU ){