fix: drag connector and group element (#10385)

This commit is contained in:
doouding
2025-02-24 06:13:04 +00:00
parent b9e3fc54fd
commit a0a97d0751
13 changed files with 255 additions and 51 deletions
@@ -30,9 +30,9 @@ export class TextElementModel extends GfxPrimitiveElementModel<TextElementProps>
return 'text';
}
static override propsToY(props: Record<string, unknown>) {
if (props.text && !(props.text instanceof Y.Text)) {
props.text = new Y.Text(props.text as string);
static propsToY(props: Record<string, unknown>) {
if (typeof props.text === 'string') {
props.text = new Y.Text(props.text);
}
return props;