@univerjs/sheets-ui 0.6.0-nightly.202502041606 → 0.6.0-nightly.202502051606
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +2 -2
- package/lib/es/index.js +11 -3
- package/lib/types/services/sheets-render.service.d.ts +1 -1
- package/lib/umd/index.js +13 -13
- package/package.json +11 -11
package/lib/es/index.js
CHANGED
|
@@ -3618,13 +3618,17 @@ let Or = class extends Ln {
|
|
|
3618
3618
|
this._initWorkbookListener(), this._initContextListener();
|
|
3619
3619
|
}
|
|
3620
3620
|
_initWorkbookListener() {
|
|
3621
|
-
this._instanceSrv.getTypeOfUnitAdded$(A.UNIVER_SHEET).pipe(ui(this.dispose$)).subscribe((e) => this._createRenderer(e)), this._instanceSrv.getAllUnitsForType(A.UNIVER_SHEET).forEach((e) => this._createRenderer(e)), this._instanceSrv.getTypeOfUnitDisposed$(A.UNIVER_SHEET).pipe(ui(this.dispose$)).subscribe((e) => this._disposeRenderer(e))
|
|
3621
|
+
this._instanceSrv.getTypeOfUnitAdded$(A.UNIVER_SHEET).pipe(ui(this.dispose$)).subscribe((e) => this._createRenderer(e)), this._instanceSrv.getAllUnitsForType(A.UNIVER_SHEET).forEach((e) => this._createRenderer(e)), this._instanceSrv.getTypeOfUnitDisposed$(A.UNIVER_SHEET).pipe(ui(this.dispose$)).subscribe((e) => this._disposeRenderer(e)), this.disposeWithMe(
|
|
3622
|
+
this._instanceSrv.getCurrentTypeOfUnit$(A.UNIVER_SHEET).subscribe((e) => {
|
|
3623
|
+
e && this._renderManagerService.setCurrent(e.getUnitId());
|
|
3624
|
+
})
|
|
3625
|
+
);
|
|
3622
3626
|
}
|
|
3623
3627
|
_createRenderer(e) {
|
|
3624
3628
|
const t = e.getUnitId();
|
|
3625
3629
|
this._renderManagerService.created$.subscribe((n) => {
|
|
3626
3630
|
n.unitId === t && (n.engine.getCanvas().setId(`${Vu}_${t}`), n.engine.getCanvas().getContext().setId(`${Vu}_${t}`));
|
|
3627
|
-
}), this._renderManagerService.createRender(t)
|
|
3631
|
+
}), this._renderManagerService.createRender(t);
|
|
3628
3632
|
}
|
|
3629
3633
|
_disposeRenderer(e) {
|
|
3630
3634
|
const t = e.getUnitId();
|
|
@@ -10972,7 +10976,11 @@ let Gs = class extends Ln {
|
|
|
10972
10976
|
if (!i)
|
|
10973
10977
|
throw new Error("No active sheet found");
|
|
10974
10978
|
const o = i.getSheetId();
|
|
10975
|
-
this._sheetSkeletonManagerService.setCurrent({ sheetId: o })
|
|
10979
|
+
this._sheetSkeletonManagerService.setCurrent({ sheetId: o });
|
|
10980
|
+
const s = () => e.render();
|
|
10981
|
+
this.disposeWithMe(this._context.activated$.subscribe((l) => {
|
|
10982
|
+
l ? t.runRenderLoop(s) : t.stopRenderLoop(s);
|
|
10983
|
+
}));
|
|
10976
10984
|
}
|
|
10977
10985
|
_initRenderMetricSubscriber() {
|
|
10978
10986
|
if (!this._telemetryService) return;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IDisposable, IContextService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
|
2
2
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
3
3
|
/**
|
|
4
|
-
* This controller is responsible for managing units of a specific kind (
|
|
4
|
+
* This controller is responsible for managing units of a specific kind (UniverSheet) to be rendered on the canvas.
|
|
5
5
|
*/
|
|
6
6
|
export declare class SheetsRenderService extends RxDisposable {
|
|
7
7
|
private readonly _contextService;
|