From aa605b3bed8679964bf78ea49bb4d87a9eb7f68c Mon Sep 17 00:00:00 2001 From: yctimlin Date: Sat, 12 Jul 2025 09:54:18 +0000 Subject: [PATCH] fix bug of text element --- src/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/index.js b/src/index.js index b51c3f7..1b2f835 100755 --- a/src/index.js +++ b/src/index.js @@ -401,6 +401,11 @@ const server = new Server( function convertTextToLabel(element) { const { text, ...rest } = element; if (text) { + // For standalone text elements, keep text as direct property + if (element.type === 'text') { + return element; // Keep text as direct property + } + // For other elements (rectangle, ellipse, diamond), convert to label format return { ...rest, label: { text }