mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 05:37:32 +00:00
refactor(editor): rename model.doc to store (#12172)
This commit is contained in:
@@ -438,7 +438,7 @@ export class ExportManager {
|
||||
if (matchModels(block, [ImageBlockModel])) {
|
||||
if (!block.props.sourceId) return;
|
||||
|
||||
const blob = await block.doc.blobSync.get(block.props.sourceId);
|
||||
const blob = await block.store.blobSync.get(block.props.sourceId);
|
||||
if (!blob) return;
|
||||
|
||||
const blobToImage = (blob: Blob) =>
|
||||
|
||||
@@ -44,7 +44,7 @@ export class SurfaceBlockModel extends BaseSurfaceModel {
|
||||
override _init() {
|
||||
this._extendElement(elementsCtorMap);
|
||||
super._init();
|
||||
this.doc.provider
|
||||
this.store.provider
|
||||
.getAll(surfaceMiddlewareIdentifier)
|
||||
.forEach(({ middleware }) => {
|
||||
this._disposables.add(middleware(this));
|
||||
|
||||
@@ -51,7 +51,7 @@ export function updateXYWH(
|
||||
bound.w = clamp(bound.w, NOTE_MIN_WIDTH * scale, Infinity);
|
||||
bound.h = clamp(bound.h, NOTE_MIN_HEIGHT * scale, Infinity);
|
||||
if (bound.h >= NOTE_MIN_HEIGHT * scale) {
|
||||
updateBlock.call(ele.doc, ele, () => {
|
||||
updateBlock.call(ele.store, ele, () => {
|
||||
ele.props.edgeless.collapse = true;
|
||||
ele.props.edgeless.collapsedHeight = bound.h / scale;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user