refactor(editor): rename store api (#9518)
This commit is contained in:
@@ -79,7 +79,7 @@ export class PreviewHelper {
|
||||
|
||||
const query = this._calculateQuery(selectedIds);
|
||||
|
||||
const doc = this.widget.doc.blockCollection.getDoc({ query });
|
||||
const doc = this.widget.doc.doc.getBlocks({ query });
|
||||
|
||||
const previewSpec = SpecProvider.getInstance().getSpec('page:preview');
|
||||
const previewStd = new BlockStdScope({
|
||||
@@ -96,7 +96,7 @@ export class PreviewHelper {
|
||||
dragPreview = new DragPreview(offset);
|
||||
dragPreview.template = previewTemplate;
|
||||
dragPreview.onRemove = () => {
|
||||
this.widget.doc.blockCollection.clearQuery(query);
|
||||
this.widget.doc.doc.clearQuery(query);
|
||||
};
|
||||
dragPreview.style.width = `${width / this.widget.scaleInNote.peek()}px`;
|
||||
dragPreview.style.transform = `translate(${posX}px, ${posY}px) scale(${this.widget.scaleInNote.peek()})`;
|
||||
|
||||
@@ -10,7 +10,7 @@ export const newIdCrossDoc =
|
||||
samePage = payload.snapshot.pageId === std.doc.id;
|
||||
}
|
||||
if (payload.type === 'block' && !samePage) {
|
||||
payload.snapshot.id = std.collection.idGenerator();
|
||||
payload.snapshot.id = std.workspace.idGenerator();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -18,7 +18,7 @@ export const surfaceRefToEmbed =
|
||||
!std.doc.hasBlock(payload.snapshot.id)
|
||||
) {
|
||||
const id = payload.snapshot.id;
|
||||
payload.snapshot.id = std.collection.idGenerator();
|
||||
payload.snapshot.id = std.workspace.idGenerator();
|
||||
payload.snapshot.flavour = 'affine:embed-linked-doc';
|
||||
payload.snapshot.props = {
|
||||
blockId: id,
|
||||
|
||||
Reference in New Issue
Block a user