fsm
fsm copied to clipboard
动画导致的问题
由于有动画,当点击过快时,组件会失去响应(假死)。
例: 点击组件,在组件展开的动画过程中,迅速点击页面其他区域。
一种简单的办法是:增加组件标示(动画状态)如:
fold:function(){
var _this = this,
options = _this.options,
slideBox = _this.slideBox;
if(!_this.animating&&_this.isFold)return;
D.removeClass(options,"hover");
S.one(slideBox).slideUp(0.2,function(){
_this.isFold = true;
_this.animating = false;
});
_this.animating = true;
}
另外一种应该 可以把动画也作为一种状态吧。?