-1
현재이 (이미지) 페이드 아웃 기능이 종료 된 후 페이드 인 기능이 실행됩니다. crossfade 할 이미지와 각 이미지의 불투명도가 겹칠 필요가 있습니다. 나는이 일을하는 데 어려움을 겪고있다. 생각?동시에 js 함수를 호출합니다. yui
_initFade: function() {
this._timer = Y.later(this._intervalDuration, this, this._startPeriod, [], false);
},
_startPeriod: function() {
this._timer = Y.later(this._intervalDuration, this, this._fadeOut, [], true);
this._fadeOut();
},
_fadeOut: function(){
var host = this.get('host');
this._animOut.set('node', host._getCurrentBlock());
this._animOut.once('end', this._fadeIn, this);
this._animOut.run();
},
_fadeIn: function(){
var host = this.get('host'),
blocks = host.get('blocks'),
index = host.get('index');
index = host._moveIndex(host._getNextIndex());
var nextBlock = blocks.item(index);
this._transparent(nextBlock);
host.syncUI();
this._animIn.set('node', nextBlock);
this._animIn.run();
},
흥미 롭군요. 나는 완벽하게 싱크가되는 것에 대해 신경 쓰지 않는다. 동시에 두 애니메이션을 모두 쏘는 것이 가능하지 않을까? 비록 동기화되지 않더라도/ – ndreckshage
물론, 'var anim1 = new Y.Anim(); anim2 = new Y.Anim(); anim1.run(); anim2.run(); ' Tween 이벤트를 사용하는 것만 큼 좋아 보이지 않을 것입니다. –