refactor(editor): rename model.doc to store (#12172)
This commit is contained in:
@@ -12,9 +12,9 @@ export const connectorWatcher: SurfaceMiddleware = (
|
||||
surface: SurfaceBlockModel
|
||||
) => {
|
||||
const hasElementById = (id: string) =>
|
||||
surface.hasElementById(id) || surface.doc.hasBlock(id);
|
||||
surface.hasElementById(id) || surface.store.hasBlock(id);
|
||||
const elementGetter = (id: string) =>
|
||||
surface.getElementById(id) ?? (surface.doc.getModelById(id) as GfxModel);
|
||||
surface.getElementById(id) ?? (surface.store.getModelById(id) as GfxModel);
|
||||
const updateConnectorPath = (connector: ConnectorElementModel) => {
|
||||
if (
|
||||
((connector.source?.id && hasElementById(connector.source.id)) ||
|
||||
@@ -70,7 +70,7 @@ export const connectorWatcher: SurfaceMiddleware = (
|
||||
addToUpdateList(element as ConnectorElementModel);
|
||||
}
|
||||
}),
|
||||
surface.doc.slots.blockUpdated.subscribe(payload => {
|
||||
surface.store.slots.blockUpdated.subscribe(payload => {
|
||||
if (
|
||||
payload.type === 'add' ||
|
||||
(payload.type === 'update' && payload.props.key === 'xywh')
|
||||
|
||||
Reference in New Issue
Block a user