From 956035b0e308db5129ea461fae868343723cede7 Mon Sep 17 00:00:00 2001 From: Hufe921 Date: Tue, 20 Feb 2024 19:45:12 +0800 Subject: [PATCH] fix: richtext elements boundary render error --- src/editor/core/draw/richtext/AbstractRichText.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/editor/core/draw/richtext/AbstractRichText.ts b/src/editor/core/draw/richtext/AbstractRichText.ts index 809e69c..d5c5ae6 100644 --- a/src/editor/core/draw/richtext/AbstractRichText.ts +++ b/src/editor/core/draw/richtext/AbstractRichText.ts @@ -28,7 +28,8 @@ export abstract class AbstractRichText { color?: string ) { const isFirstRecord = !this.fillRect.width - if (!isFirstRecord && this.fillColor && this.fillColor !== color) { + // 颜色不同时立即绘制 + if (!isFirstRecord && this.fillColor !== color) { this.render(ctx) this.clearFillInfo() // 重新记录