Liquid FireEmber 應(yīng)用動畫支持
Liquid Fire 為 Ember 應(yīng)用提供了完整的動畫支持。
示例代碼:
import { animate, stop } from "vendor/liquid-fire";
export function crossFade(oldView, insertNewView, opts) {
stop(oldView);
return insertNewView().then(function(newView) {
return Promise.all([
animate(oldView, {opacity: 0}, opts),
animate(newView, {opacity: [1, 0]}, opts)
]);
});
});
export function fade(oldView, insertNewView) {
stop(oldView);
return animate(oldView, {opacity: 0})
.then(insertNewView)
.then(function(newView){
return animate(newView, {opacity: [1, 0]});
});
});評論
圖片
表情
