Добавлен эффект листания - Протаивание

This commit is contained in:
Book Pauk
2019-02-15 21:36:06 +07:00
parent 0805353a9e
commit daaf9ac70b
4 changed files with 90 additions and 29 deletions

View File

@@ -1,3 +1,5 @@
//import {sleep} from '../../../share/utils';
export default class DrawHelper {
fontBySize(size) {
return `${size}px ${this.fontName}`;
@@ -213,4 +215,10 @@ export default class DrawHelper {
return `<div style="position: absolute; left: ${x}px; top: ${y}px; ` +
`width: ${w}px; height: ${h}px; box-sizing: border-box; border: 1px solid ${color}"></div>`;
}
async doPageAnimationThaw(page1, page2, duration, isDown, animationFinish) {
page1.style.animation = `page1-animation-thaw ${duration}ms ease-in 1`;
page2.style.animation = `page2-animation-thaw ${duration}ms ease-in 1`;
await animationFinish(duration + 201);
}
}