fix bug of text element
This commit is contained in:
@@ -401,6 +401,11 @@ const server = new Server(
|
|||||||
function convertTextToLabel(element) {
|
function convertTextToLabel(element) {
|
||||||
const { text, ...rest } = element;
|
const { text, ...rest } = element;
|
||||||
if (text) {
|
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 {
|
return {
|
||||||
...rest,
|
...rest,
|
||||||
label: { text }
|
label: { text }
|
||||||
|
|||||||
Reference in New Issue
Block a user