From 741963275e1e322cc06236bb336e3eea60c21209 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Fri, 22 Sep 2023 10:49:07 +0800 Subject: [PATCH] fix --- server/websocket/internal/logic/ws_render_image.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/server/websocket/internal/logic/ws_render_image.go b/server/websocket/internal/logic/ws_render_image.go index 1bd4f40c..a900c8b3 100644 --- a/server/websocket/internal/logic/ws_render_image.go +++ b/server/websocket/internal/logic/ws_render_image.go @@ -66,10 +66,15 @@ func (w *wsConnectItem) consumeRenderImageData() { case <-w.closeChan: //已关闭 return case data := <-w.extendRenderProperty.renderChan: //消费数据 - //属性相同则发送渲染,不同则抛弃 - if data.RenderData.TemplateTag == w.extendRenderProperty.templateTag && data.RenderData.TemplateTagColor.SelectedColorIndex == w.extendRenderProperty.colorSelectedIndex { - w.renderImage(data) + //属性不同则不发送渲染 + if data.RenderData.TemplateTag != w.extendRenderProperty.templateTag { + continue } + //属性不同则不发送渲染 + if data.RenderData.TemplateTagColor.SelectedColorIndex != w.extendRenderProperty.colorSelectedIndex { + continue + } + w.renderImage(data) } } }