diff --git a/src/canvas/Painter.ts b/src/canvas/Painter.ts index 1054905e..b5ae9c6f 100644 --- a/src/canvas/Painter.ts +++ b/src/canvas/Painter.ts @@ -310,7 +310,7 @@ export default class CanvasPainter implements PainterBase { } paintOne(ctx: CanvasRenderingContext2D, el: Displayable) { - brushSingle(ctx, el, this._opts.darkMode); + brushSingle(ctx, el, this._opts.darkMode, this._opts.darkColorMap); } private _paintList(list: Displayable[], prevList: Displayable[], paintAll: boolean, redrawId?: number) { diff --git a/src/canvas/graphic.ts b/src/canvas/graphic.ts index 1092ca0e..b355391a 100644 --- a/src/canvas/graphic.ts +++ b/src/canvas/graphic.ts @@ -615,8 +615,8 @@ function getStyle(el: Displayable, inHover?: boolean) { export function brushSingle( ctx: CanvasRenderingContext2D, el: Displayable, - darkMode: boolean, - darkColorMap: Dictionary + darkMode?: boolean, + darkColorMap?: Dictionary ) { const scope: BrushScope = { inHover: false,