Skip to content

Commit

Permalink
fix: fix .d.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
liihuu committed Aug 21, 2023
1 parent 9813e53 commit fe47baf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/widget/DrawWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default abstract class DrawWidget<C extends Axis = Axis> extends Widget<C
})
}

override updateImp (level: UpdateLevel, container: HTMLElement, bounding: Bounding): void {
override updateImp (container: HTMLElement, bounding: Bounding, level: UpdateLevel): void {
const { width, height, left } = bounding
container.style.left = `${left}px`

Expand Down
2 changes: 1 addition & 1 deletion src/widget/SeparatorWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export default class SeparatorWidget extends Widget<YAxis> {
container.appendChild(this._moveDom)
}

override updateImp (level: UpdateLevel, container: HTMLElement, bounding: Bounding): void {
override updateImp (container: HTMLElement, bounding: Bounding, level: UpdateLevel): void {
if (level === UpdateLevel.All || level === UpdateLevel.Separator) {
const styles = this.getPane().getChart().getStyles().separator
this._moveDom.style.top = `${-Math.floor((REAL_SEPARATOR_HEIGHT - styles.size) / 2)}px`
Expand Down
6 changes: 3 additions & 3 deletions src/widget/Widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ export default abstract class Widget<C extends Axis = Axis> extends Eventful imp
return this._pane
}

update (level: UpdateLevel): void {
this.updateImp(level, this._container, this._bounding)
update (level?: UpdateLevel): void {
this.updateImp(this._container, this._bounding, level ?? UpdateLevel.Drawer)
}

abstract getName (): string
Expand All @@ -91,5 +91,5 @@ export default abstract class Widget<C extends Axis = Axis> extends Eventful imp

protected abstract initDom (container: HTMLElement): void

protected abstract updateImp (level: UpdateLevel, container: HTMLElement, bounding: Bounding): void
protected abstract updateImp (container: HTMLElement, bounding: Bounding, level: UpdateLevel): void
}

1 comment on commit fe47baf

@liihuu
Copy link
Member Author

@liihuu liihuu commented on fe47baf Aug 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.