You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
697 B
25 lines
697 B
import { BaseShape } from './shapes';
|
|
export class BaseElement extends BaseShape {
|
|
get context() {
|
|
// @ts-expect-error skip type-check
|
|
return this.config.context;
|
|
}
|
|
get parsedAttributes() {
|
|
return this.attributes;
|
|
}
|
|
/**
|
|
* <zh/> 动画帧执行函数
|
|
*
|
|
* <en/> Animation frame execution function
|
|
*/
|
|
onframe() { }
|
|
animate(keyframes, options) {
|
|
const animation = super.animate(keyframes, options);
|
|
if (animation) {
|
|
animation.onframe = () => this.onframe();
|
|
animation.finished.then(() => this.onframe());
|
|
}
|
|
return animation;
|
|
}
|
|
}
|
|
//# sourceMappingURL=base-element.js.map
|