mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-05 19:40:30 +08:00
refactor(editor): rename model.doc to store (#12172)
This commit is contained in:
@@ -130,14 +130,14 @@ export class EdgelessNoteBlockComponent extends toGfxBlockComponent(
|
||||
const { collapse, collapsedHeight } = this.model.props.edgeless;
|
||||
|
||||
if (collapse) {
|
||||
this.model.doc.updateBlock(this.model, () => {
|
||||
this.model.store.updateBlock(this.model, () => {
|
||||
this.model.props.edgeless.collapse = false;
|
||||
});
|
||||
} else if (collapsedHeight) {
|
||||
const { xywh, edgeless } = this.model.props;
|
||||
const bound = Bound.deserialize(xywh);
|
||||
bound.h = collapsedHeight * (edgeless.scale ?? 1);
|
||||
this.model.doc.updateBlock(this.model, () => {
|
||||
this.model.store.updateBlock(this.model, () => {
|
||||
this.model.props.edgeless.collapse = true;
|
||||
this.model.props.xywh = bound.serialize();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user