feat(editor): replace slot with rxjs subject (#10768)

This commit is contained in:
Mirone
2025-03-12 11:29:24 +09:00
committed by GitHub
parent 19f978d9aa
commit cd63e0ed8b
302 changed files with 1405 additions and 1251 deletions

View File

@@ -126,7 +126,7 @@ export class EdgelessNoteBlockComponent extends toGfxBlockComponent(
this._editing = selection.has(this.model.id) && selection.editing;
this._disposables.add(
selection.slots.updated.on(() => {
selection.slots.updated.subscribe(() => {
if (selection.has(this.model.id) && selection.editing) {
this._editing = true;
} else {
@@ -147,7 +147,7 @@ export class EdgelessNoteBlockComponent extends toGfxBlockComponent(
const selection = this.gfx.selection;
_disposables.add(
this.edgelessSlots.elementResizeStart.on(() => {
this.edgelessSlots.elementResizeStart.subscribe(() => {
if (selection.selectedElements.includes(this.model)) {
this._isResizing = true;
}
@@ -155,7 +155,7 @@ export class EdgelessNoteBlockComponent extends toGfxBlockComponent(
);
_disposables.add(
this.edgelessSlots.elementResizeEnd.on(() => {
this.edgelessSlots.elementResizeEnd.subscribe(() => {
this._isResizing = false;
})
);