diff --git a/src/widget/DrawWidget.ts b/src/widget/DrawWidget.ts index e431807a2..445214e36 100644 --- a/src/widget/DrawWidget.ts +++ b/src/widget/DrawWidget.ts @@ -116,7 +116,7 @@ export default abstract class DrawWidget extends Widget { 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` diff --git a/src/widget/Widget.ts b/src/widget/Widget.ts index 6b13e8844..0cb00e22f 100644 --- a/src/widget/Widget.ts +++ b/src/widget/Widget.ts @@ -79,8 +79,8 @@ export default abstract class Widget 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 @@ -91,5 +91,5 @@ export default abstract class Widget 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 }