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
@@ -61,7 +61,7 @@ export class MindMapView extends GfxElementModelView<MindmapElementModel> {
});
this.disposable.add(
this.model.propsUpdated.on(({ key }) => {
this.model.propsUpdated.subscribe(({ key }) => {
if (key === 'layoutType' || key === 'style') {
updateButtons();
}
@@ -69,7 +69,7 @@ export class MindMapView extends GfxElementModelView<MindmapElementModel> {
);
this.disposable.add(
this.surface.elementUpdated.on(payload => {
this.surface.elementUpdated.subscribe(payload => {
if (this.model.children.has(payload.id)) {
if (payload.props['xywh']) {
updateButtons();
@@ -142,7 +142,7 @@ export class MindMapView extends GfxElementModelView<MindmapElementModel> {
private _setVisibleOnSelection() {
let lastNode: null | string = null;
this.disposable.add(
this.gfx.selection.slots.updated.on(() => {
this.gfx.selection.slots.updated.subscribe(() => {
const elm = this.gfx.selection.firstElement;
if (lastNode) {