mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-13 16:16:46 +08:00
chore(editor): rename std.doc to std.store (#9596)
This commit is contained in:
@@ -50,7 +50,7 @@ export class GfxController extends LifeCycleWatcher {
|
||||
readonly viewport: Viewport = new Viewport();
|
||||
|
||||
get doc() {
|
||||
return this.std.doc;
|
||||
return this.std.store;
|
||||
}
|
||||
|
||||
get elementsBound() {
|
||||
|
||||
@@ -316,7 +316,7 @@ export class GfxSelectionManager extends GfxExtension {
|
||||
}
|
||||
|
||||
const { blocks = [], elements = [] } = groupBy(selection.elements, id => {
|
||||
return this.std.doc.getBlockById(id) ? 'blocks' : 'elements';
|
||||
return this.std.store.getBlockById(id) ? 'blocks' : 'elements';
|
||||
});
|
||||
let instances: (SurfaceSelection | CursorSelection)[] = [];
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ export class SurfaceMiddlewareExtension extends LifeCycleWatcher {
|
||||
this.std.provider.getAll(SurfaceMiddlewareBuilderIdentifier).values()
|
||||
);
|
||||
|
||||
const dispose = onSurfaceAdded(this.std.doc, surface => {
|
||||
const dispose = onSurfaceAdded(this.std.store, surface => {
|
||||
if (surface) {
|
||||
surface.applyMiddlewares(builders.map(builder => builder.middleware));
|
||||
queueMicrotask(() => dispose());
|
||||
|
||||
@@ -107,7 +107,7 @@ export class ViewManager extends GfxExtension {
|
||||
updateViewOnElementChange(this.gfx.surface);
|
||||
} else {
|
||||
this._disposable.add(
|
||||
onSurfaceAdded(this.std.doc, surface => {
|
||||
onSurfaceAdded(this.std.store, surface => {
|
||||
if (surface) {
|
||||
updateViewOnElementChange(surface);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user