mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-22 12:32:00 +08:00
refactor(editor): reduce dependency to doc collection (#9492)
This commit is contained in:
@@ -23,7 +23,7 @@ import {
|
||||
polyLineNearestPoint,
|
||||
Vec,
|
||||
} from '@blocksuite/global/utils';
|
||||
import { DocCollection, type Y } from '@blocksuite/store';
|
||||
import * as Y from 'yjs';
|
||||
|
||||
import {
|
||||
CONNECTOR_LABEL_MAX_WIDTH,
|
||||
@@ -126,8 +126,8 @@ export class ConnectorElementModel extends GfxPrimitiveElementModel<ConnectorEle
|
||||
}
|
||||
|
||||
static override propsToY(props: ConnectorElementProps) {
|
||||
if (props.text && !(props.text instanceof DocCollection.Y.Text)) {
|
||||
props.text = new DocCollection.Y.Text(props.text);
|
||||
if (props.text && !(props.text instanceof Y.Text)) {
|
||||
props.text = new Y.Text(props.text);
|
||||
}
|
||||
|
||||
return props;
|
||||
|
||||
Reference in New Issue
Block a user