Skip to content

Commit

Permalink
fix: fix type error in glyph-element
Browse files Browse the repository at this point in the history
  • Loading branch information
xile611 committed Dec 13, 2023
1 parent 86c4e11 commit e9aa161
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/vgrammar-core/src/graph/glyph-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class GlyphElement extends Element implements IGlyphElement {

useStates(states: string[], hasAnimation?: boolean) {
if (!this.graphicItem) {
return;
return false;
}
this.mark.emit(HOOK_EVENT.BEFORE_ELEMENT_STATE, { states }, this);

Expand All @@ -76,6 +76,8 @@ export class GlyphElement extends Element implements IGlyphElement {
this.graphicItem.useStates(this.states, stateAnimationEnable);

this.mark.emit(HOOK_EVENT.AFTER_ELEMENT_STATE, { states }, this);

return true;
}

protected getStateAttrs = (stateName: string, nextStates: string[]) => {
Expand Down

0 comments on commit e9aa161

Please sign in to comment.