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

@@ -178,19 +178,19 @@ export class EdgelessTextEditor extends WithDisposable(ShadowlessElement) {
this.updateComplete
.then(() => {
if (!this.inlineEditor) return;
this.inlineEditor.slots.renderComplete.on(() => {
this.inlineEditor.slots.renderComplete.subscribe(() => {
this._updateRect();
this.requestUpdate();
});
this.disposables.add(
surface.elementUpdated.on(({ id }) => {
surface.elementUpdated.subscribe(({ id }) => {
if (id === element.id) this.requestUpdate();
})
);
this.disposables.add(
this.gfx.viewport.viewportUpdated.on(() => {
this.gfx.viewport.viewportUpdated.subscribe(() => {
this.requestUpdate();
})
);