|
@@ -9,7 +9,6 @@ export class AnimCtrl extends ModuleControl<EditorModule> {
|
|
|
initEvent() {
|
|
|
Effect.value(()=>this.store.shortPage).item((v)=>v.offset, (shortState)=>{
|
|
|
console.log("xx")
|
|
|
-
|
|
|
let next = shortState.index;
|
|
|
if (shortState.offset < 0 ) {
|
|
|
next = shortState.index + 1;
|
|
@@ -17,32 +16,30 @@ export class AnimCtrl extends ModuleControl<EditorModule> {
|
|
|
if (shortState.offset > 0 ) {
|
|
|
next = shortState.index - 1;
|
|
|
}
|
|
|
- this.initAnim();
|
|
|
this.startAnim(next);
|
|
|
-
|
|
|
}).run();
|
|
|
}
|
|
|
|
|
|
startAnim(index:number) {
|
|
|
- const childrens = this.helper.findCardAllChildren(index);
|
|
|
-
|
|
|
- console.log("start anim=>", index, childrens.length);
|
|
|
+ this.store.shortPage.next = index;
|
|
|
+ // const childrens = this.helper.findCardAllChildren(index);
|
|
|
|
|
|
- childrens.forEach((c)=>{
|
|
|
- const comp = this.helper.findComp(c) as DesignComp;
|
|
|
- if (!comp.anim) return;
|
|
|
- comp.anim.transition = false;
|
|
|
- comp.layout.transformMatrix = comp.anim.startMatrix;
|
|
|
- comp.layout.opacity = 0;
|
|
|
+ // console.log("start anim=>", index, childrens.length);
|
|
|
+ // childrens.forEach((c)=>{
|
|
|
+ // const comp = this.helper.findComp(c) as DesignComp;
|
|
|
+ // if (!comp.anim) return;
|
|
|
+ // comp.anim.transition = false;
|
|
|
+ // comp.layout.transformMatrix = comp.anim.startMatrix;
|
|
|
+ // comp.layout.opacity = 0;
|
|
|
|
|
|
- setTimeout(() => {
|
|
|
- if (comp.anim) {
|
|
|
- comp.anim.transition = true;
|
|
|
- comp.layout.transformMatrix = comp.anim.endMatrix;
|
|
|
- comp.layout.opacity = 1;
|
|
|
- }
|
|
|
- }, 100);
|
|
|
- })
|
|
|
+ // setTimeout(() => {
|
|
|
+ // if (comp.anim) {
|
|
|
+ // comp.anim.transition = true;
|
|
|
+ // comp.layout.transformMatrix = comp.anim.endMatrix;
|
|
|
+ // comp.layout.opacity = 1;
|
|
|
+ // }
|
|
|
+ // }, 100);
|
|
|
+ // })
|
|
|
}
|
|
|
|
|
|
|