mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-23 21:38:44 +08:00
refactor(editor): reduce dependency to doc collection (#9492)
This commit is contained in:
@@ -16,7 +16,7 @@ import type {
|
||||
PointLocation,
|
||||
SerializedXYWH,
|
||||
} from '@blocksuite/global/utils';
|
||||
import { DocCollection, type Y } from '@blocksuite/store';
|
||||
import * as Y from 'yjs';
|
||||
|
||||
import {
|
||||
DEFAULT_ROUGHNESS,
|
||||
@@ -68,8 +68,8 @@ export class ShapeElementModel extends GfxPrimitiveElementModel<ShapeProps> {
|
||||
}
|
||||
|
||||
static override propsToY(props: ShapeProps) {
|
||||
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