Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

fix: trigger selectionMoveEnd$ when using keyboard to change selections. (#3731)

lumix7b67be215cd3
diff --git a/e2e/visual-comparison/sheets/sheets-visual-comparison.spec.ts b/e2e/visual-comparison/sheets/sheets-visual-comparison.spec.ts
index 88c1e342cb..0d13d8601e 100644
--- a/e2e/visual-comparison/sheets/sheets-visual-comparison.spec.ts
+++ b/e2e/visual-comparison/sheets/sheets-visual-comparison.spec.ts
@@ -32,7 +32,7 @@ test('diff default sheet toolbar', async () => {
await page.goto('http://localhost:3000/sheets/');
await page.waitForTimeout(2000);
await page.evaluate(() => window.E2EControllerAPI.loadDefaultSheet());
- await page.waitForTimeout(3000);
+ await page.waitForTimeout(5000);
const filename = generateSnapshotName('default-sheet-fullpage');
const screenshot = await page.screenshot({
diff --git a/packages/engine-render/src/layer.ts b/packages/engine-render/src/layer.ts
index e96f286e7a..e067faf137 100644
--- a/packages/engine-render/src/layer.ts
+++ b/packages/engine-render/src/layer.ts
@@ -14,15 +14,15 @@
* limitations under the License.
*/
-import { Disposable, requestImmediateMacroTask, sortRules, toDisposable } from '@univerjs/core';
import type { Nullable } from '@univerjs/core';
+import type { UniverRenderingContext } from './context';
+import type { Scene } from './scene';
+import type { SceneViewer } from './scene-viewer';
+import { Disposable, requestImmediateMacroTask, sortRules, toDisposable } from '@univerjs/core';
import { BaseObject } from './base-object';
import { RENDER_CLASS_TYPE } from './basics/const';
import { Canvas } from './canvas';
-import type { UniverRenderingContext } from './context';
-import type { Scene } from './scene';
-import type { SceneViewer } from './scene-viewer';
export class Layer extends Disposable {
private _objects: BaseObject[] = [];
diff --git a/packages/sheets-drawing-ui/src/commands/commands/move-drawings.command.ts b/packages/sheets-drawing-ui/src/commands/commands/move-drawings.command.ts
index d95609f220..b29290d848 100644
--- a/packages/sheets-drawing-ui/src/commands/commands/move-drawings.command.ts
+++ b/packages/sheets-drawing-ui/src/commands/commands/move-drawings.command.ts
@@ -15,14 +15,14 @@
*/
import type { IAccessor, ICommand } from '@univerjs/core';
-import { CommandType, Direction, ICommandService } from '@univerjs/core';
import type { ISheetDrawing } from '@univerjs/sheets-drawing';
+import type { ISetDrawingCommandParams } from './interfaces';
+import { CommandType, Direction, ICommandService } from '@univerjs/core';
import { ISheetDrawingService } from '@univerjs/sheets-drawing';
-import { ISheetSelectionRenderService } from '@univerjs/sheets-ui';
+import { ISheetSelectionRenderService } from '@univerjs/sheets-ui';
import { transformToDrawingPosition } from '../../basics/transform-position';
import { ClearSheetDrawingTransformerOperation } from '../operations/clear-drawing-transformer.operation';
-import type { ISetDrawingCommandParams } from './interfaces';
import { SetSheetDrawingCommand } from './set-sheet-drawing.command';
export interface IMoveDrawingsCommandParams {
diff --git a/packages/sheets-ui/src/commands/commands/__tests__/create-selection-command-test-bed.ts b/packages/sheets-ui/src/commands/commands/__tests__/create-selection-command-test-bed.ts
index d0fd87b465..c6ed1fbf6d 100644
--- a/packages/sheets-ui/src/commands/commands/__tests__/create-selection-command-test-bed.ts
+++ b/packages/sheets-ui/src/commands/commands/__tests__/create-selection-command-test-bed.ts
@@ -16,10 +16,12 @@
import type { IWorkbookData } from '@univerjs/core';
import { Disposable, DisposableCollection, ICommandService, LocaleType, UniverInstanceType } from '@univerjs/core';
-import { SetFrozenMutation, SetSelectionsOperation } from '@univerjs/sheets';
import { IRenderManagerService, RenderManagerService } from '@univerjs/engine-render';
+import { SetFrozenMutation, SetSelectionsOperation } from '@univerjs/sheets';
import { SheetScrollManagerService } from '../../../services/scroll-manager.service';
+import { SelectAllService } from '../../../services/select-all/select-all.service';
+import { SheetSkeletonManagerService } from '../../../services/sheet-skeleton-manager.service';
import { ShortcutExperienceService } from '../../../services/shortcut-experience.service';
import {
CancelFrozenCommand,
@@ -28,82 +30,8 @@ import {
SetSelectionFrozenCommand,
} from '../set-frozen.command';
import { ExpandSelectionCommand, MoveSelectionCommand, SelectAllCommand } from '../set-selection.command';
-import { SheetSkeletonManagerService } from '../../../services/sheet-skeleton-manager.service';
-import { SelectAllService } from '../../../services/select-all/select-all.service';
import { createCommandTestBed } from './create-command-test-bed';
-export function createSelectionCommandTestBed(workbookData?: IWorkbookData) {
- const { univer, get, sheet } = createCommandTestBed(workbookData || SIMPLE_SELECTION_WORKBOOK_DATA, [
- [ShortcutExperienceService],
- [SelectAllService],
- ]);
-
- const commandService = get(ICommandService);
- [MoveSelectionCommand, ExpandSelectionCommand, SelectAllCommand, SetSelectionsOperation].forEach((c) => {
- commandService.registerCommand(c);
- });
-
- return {
- univer,
- get,
- sheet,
- };
-}
-
-export function createFrozenCommandTestBed(workbookData?: IWorkbookData) {
- const { univer, get, sheet } = createCommandTestBed(workbookData || SIMPLE_SELECTION_WORKBOOK_DATA, [
- [SheetScrollManagerService],
- [ShortcutExperienceService],
- [IRenderManagerService, { useClass: RenderManagerService }],
- ]);
-
- const commandService = get(ICommandService);
- [
- SetSelectionFrozenCommand,
- SetRowFrozenCommand,
- SetColumnFrozenCommand,
- CancelFrozenCommand,
- SetSelectionsOperation,
- SetFrozenMutation,
- ].forEach((c) => {
- commandService.registerCommand(c);
- });
-
- const unitId = sheet.getUnitId();
- const injector = univer.__getInjector();
-
- // NOTE: this is a hack. Please refer to ./services/clipboard/__tests__/clipboard-test-bed.ts
- const fakeSheetSkeletonManagerService = new SheetSkeletonManagerService({
- unit: sheet,
- unitId,
- type: UniverInstanceType.UNIVER_SHEET,
-
- engine: null as any,
- scene: null as any,
- mainComponent: null as any,
- components: null as any,
- isMainScene: true,
- }, injector);
-
- injector.add([SheetSkeletonManagerService, { useValue: fakeSheetSkeletonManagerService }]);
- injector.get(IRenderManagerService).addRender(unitId, {
- unitId,
- type: UniverInstanceType.UNIVER_SHEET,
- engine: new Disposable() as any,
- scene: new DisposableCollection() as any,
- mainComponent: null as any,
- components: new Map(),
- isMainScene: true,
- with: injector.get.bind(injector),
- });
-
- return {
- univer,
- get,
- sheet,
- };
-}
-
export const SELECTION_WITH_EMPTY_CELLS_DATA: IWorkbookData = {
id: 'test',
appVersion: '3.0.0-alpha',
@@ -223,3 +151,88 @@ export const SIMPLE_SELECTION_WORKBOOK_DATA: IWorkbookData = {
sheetOrder: [],
styles: {},
};
+
+export function createSelectionCommandTestBed(workbookData?: IWorkbookData) {
+ const { univer, get, sheet } = createCommandTestBed(workbookData || SIMPLE_SELECTION_WORKBOOK_DATA, [
+ [ShortcutExperienceService],
+ [SelectAllService],
+ [IRenderManagerService, { useClass: RenderManagerService }],
+ ]);
+
+ const commandService = get(ICommandService);
+ [MoveSelectionCommand, ExpandSelectionCommand, SelectAllCommand, SetSelectionsOperation].forEach((c) => {
+ commandService.registerCommand(c);
+ });
+
+ return {
+ univer,
+ get,
+ sheet,
+ };
+}
+
+export function createFrozenCommandTestBed(workbookData?: IWorkbookData) {
+ const { univer, get, sheet } = createCommandTestBed(workbookData || SIMPLE_SELECTION_WORKBOOK_DATA, [
+ [SheetScrollManagerService],
+ [ShortcutExperienceService],
+ [IRenderManagerService, { useClass: RenderManagerService }],
+ ]);
+
+ const commandService = get(ICommandService);
+ [
+ SetSelectionFrozenCommand,
+ SetRowFrozenCommand,
+ SetColumnFrozenCommand,
+ CancelFrozenCommand,
+ SetSelectionsOperation,
+ SetFrozenMutation,
+ ].forEach((c) => {
+ commandService.registerCommand(c);
+ });
+
+ const unitId = sheet.getUnitId();
+ const injector = univer.__getInjector();
+
+ // NOTE: this is a hack. Please refer to ./services/clipboard/__tests__/clipboard-test-bed.ts
+ const fakeSheetSkeletonManagerService = new SheetSkeletonManagerService({
+ unit: sheet,
+ unitId,
+ type: UniverInstanceType.UNIVER_SHEET,
+
+ engine: null as any,
+ scene: null as any,
+ mainComponent: null as any,
+ components: null as any,
+ isMainScene: true,
+ }, injector);
+
+ injector.add([SheetSkeletonManagerService, { useValue: fakeSheetSkeletonManagerService }]);
+ injector.get(IRenderManagerService).addRender(unitId, {
+ unitId,
+ type: UniverInstanceType.UNIVER_SHEET,
+ engine: new Disposable() as any,
+ scene: new DisposableCollection() as any,
+ mainComponent: null as any,
+ components: new Map(),
+ isMainScene: true,
+ with: injector.get.bind(injector),
+ });
+
+ return {
+ univer,
+ get,
+ sheet,
+ };
+}
+
+// export class MockRenderManagerService implements Pick<IRenderManagerService, 'getRenderById'> {
+// constructor(
+// @Inject(Injector) private readonly _injector: Injector
+// ) { }
+
+// getRenderById(_unitId: string): Nullable<IRender> {
+// return {
+// with: <T>(identifier: DependencyIdentifier<T>) => this._injector.get(identifier),
+// } as unknown as IRender;
+// }
+// }
diff --git a/packages/sheets-ui/src/commands/commands/__tests__/set-selections.command.spec.ts b/packages/sheets-ui/src/commands/commands/__tests__/set-selections.command.spec.ts
index d65cd7364b..c26657a0dc 100644
--- a/packages/sheets-ui/src/commands/commands/__tests__/set-selections.command.spec.ts
+++ b/packages/sheets-ui/src/commands/commands/__tests__/set-selections.command.spec.ts
@@ -15,6 +15,11 @@
*/
import type { Injector, IWorkbookData, Univer, Workbook } from '@univerjs/core';
+import type {
+ IExpandSelectionCommandParams,
+ IMoveSelectionCommandParams,
+ ISelectAllCommandParams,
+} from '../set-selection.command';
import { Direction, ICommandService, IUniverInstanceService, RANGE_TYPE, UniverInstanceType } from '@univerjs/core';
import {
SetColHiddenCommand,
@@ -27,13 +32,8 @@ import {
SetSelectedRowsVisibleCommand,
SheetsSelectionsService,
} from '@univerjs/sheets';
-import { afterEach, beforeEach, describe, expect, it } from 'vitest';
-import type {
- IExpandSelectionCommandParams,
- IMoveSelectionCommandParams,
- ISelectAllCommandParams,
-} from '../set-selection.command';
+import { afterEach, beforeEach, describe, expect, it } from 'vitest';
import { ExpandSelectionCommand, JumpOver, MoveSelectionCommand, SelectAllCommand } from '../set-selection.command';
import {
createSelectionCommandTestBed,
diff --git a/packages/sheets-ui/src/commands/commands/set-selection.command.ts b/packages/sheets-ui/src/commands/commands/set-selection.command.ts
index 044d5f227d..dd45967dab 100644
--- a/packages/sheets-ui/src/commands/commands/set-selection.command.ts
+++ b/packages/sheets-ui/src/commands/commands/set-selection.command.ts
@@ -16,6 +16,8 @@
import type { Direction, ICommand, IRange } from '@univerjs/core';
import { CommandType, ICommandService, IUniverInstanceService, RANGE_TYPE, Rectangle, Tools } from '@univerjs/core';
+import { IRenderManagerService } from '@univerjs/engine-render';
+
import {
expandToContinuousRange,
getCellAtRowCol,
@@ -24,9 +26,9 @@ import {
SetSelectionsOperation,
} from '@univerjs/sheets';
import { KeyCode } from '@univerjs/ui';
-
-import { ShortcutExperienceService } from '../../services/shortcut-experience.service';
import { SelectAllService } from '../../services/select-all/select-all.service';
+import { ISheetSelectionRenderService } from '../../services/selection/base-selection-render.service';
+import { ShortcutExperienceService } from '../../services/shortcut-experience.service';
import {
checkIfShrink,
expandToNextCell,
@@ -54,8 +56,13 @@ export interface IMoveSelectionCommandParams {
nextStep?: number;
}
+export interface IMoveSelectionEnterAndTabCommandParams {
+ direction: Direction;
+ keycode: KeyCode;
+}
+
/**
- * Move selection
+ * Move selection (Mainly by keyboard arrow keys, Tab and Enter key see MoveSelectionEnterAndTabCommand)
*/
export const MoveSelectionCommand: ICommand<IMoveSelectionCommandParams> = {
id: 'sheet.command.move-selection',
@@ -88,44 +95,44 @@ export const MoveSelectionCommand: ICommand<IMoveSelectionCommandParams> = {
if (Rectangle.equals(destRange, startRange)) {
return false;
}
-
+ const unitId = workbook.getUnitId();
// If there are changes to the selection, clear the start position saved by the tab.
// This function works in conjunction with the enter and tab shortcuts.
accessor.get(ShortcutExperienceService).remove({
- unitId: workbook.getUnitId(),
+ unitId,
sheetId: worksheet.getSheetId(),
keycode: KeyCode.TAB,
});
- return accessor.get(ICommandService).executeCommand(SetSelectionsOperation.id, {
+ const selections = [
+ {
+ range: Rectangle.clone(destRange),
+ primary: {
+ startRow: destRange.startRow,
+ startColumn: destRange.startColumn,
+ endRow: destRange.endRow,
+ endColumn: destRange.endColumn,
+ actualRow: next.startRow,
+ actualColumn: next.startColumn,
+ isMerged: destRange.isMerged,
+ isMergedMainCell:
+ destRange.startRow === next.startRow && destRange.startColumn === next.startColumn,
+ },
+ },
+ ];
+
+ const rs = accessor.get(ICommandService).executeCommand(SetSelectionsOperation.id, {
unitId: workbook.getUnitId(),
subUnitId: worksheet.getSheetId(),
-
- selections: [
- {
- range: Rectangle.clone(destRange),
- primary: {
- startRow: destRange.startRow,
- startColumn: destRange.startColumn,
- endRow: destRange.endRow,
- endColumn: destRange.endColumn,
- actualRow: next.startRow,
- actualColumn: next.startColumn,
- isMerged: destRange.isMerged,
- isMergedMainCell:
- destRange.startRow === next.startRow && destRange.startColumn === next.startColumn,
- },
- },
- ],
+ selections,
});
+ const renderManagerService = accessor.get(IRenderManagerService);
+ const selectionService = renderManagerService.getRenderById(unitId)?.with(ISheetSelectionRenderService);
+ selectionService?.refreshSelectionMoveEnd();
+ return rs;
},
};
-export interface IMoveSelectionEnterAndTabCommandParams {
- direction: Direction;
- keycode: KeyCode;
-}
-
/**
* Move selection for enter and tab.
*/
@@ -260,12 +267,16 @@ export const MoveSelectionEnterAndTabCommand: ICommand<IMoveSelectionEnterAndTab
};
}
- return accessor.get(ICommandService).executeCommand(SetSelectionsOperation.id, {
+ const rs = accessor.get(ICommandService).executeCommand(SetSelectionsOperation.id, {
unitId,
subUnitId: sheetId,
selections: [resultRange],
});
+ const renderManagerService = accessor.get(IRenderManagerService);
+ const selectionService = renderManagerService.getRenderById(unitId)?.with(ISheetSelectionRenderService);
+ selectionService?.refreshSelectionMoveEnd();
+ return rs;
},
};
diff --git a/packages/sheets-ui/src/services/selection/base-selection-render.service.ts b/packages/sheets-ui/src/services/selection/base-selection-render.service.ts
index 8beb9edaf4..1fd8cff4ab 100644
--- a/packages/sheets-ui/src/services/selection/base-selection-render.service.ts
+++ b/packages/sheets-ui/src/services/selection/base-selection-render.service.ts
@@ -80,6 +80,8 @@ export interface ISheetSelectionRenderService {
getSelectionCellByPosition(x: number, y: number): Nullable<ISelectionCellWithMergeInfo>; // drawing
setSingleSelectionEnabled(enabled: boolean): void;
+
+ refreshSelectionMoveEnd(): void;
}
export const ISheetSelectionRenderService = createIdentifier<ISheetSelectionRenderService>('univer.sheet.selection-render-service');
@@ -145,10 +147,17 @@ export class BaseSelectionRenderService extends Disposable implements ISheetSele
protected _singleSelectionEnabled: boolean = false;
// #endregion
+ /**
+ * Mainly emit by pointerup (pointerup is handled in _onPointerdown)
+ */
protected readonly _selectionMoveEnd$ = new BehaviorSubject<ISelectionWithCoordAndStyle[]>([]);
readonly selectionMoveEnd$ = this._selectionMoveEnd$.asObservable();
protected readonly _selectionMoving$ = new Subject<ISelectionWithCoordAndStyle[]>();
readonly selectionMoving$ = this._selectionMoving$.asObservable();
+
+ /**
+ * Mainly emit by pointerdown
+ */
protected readonly _selectionMoveStart$ = new Subject<ISelectionWithCoordAndStyle[]>();
readonly selectionMoveStart$ = this._selectionMoveStart$.asObservable();
@@ -413,11 +422,12 @@ export class BaseSelectionRenderService extends Disposable implements ISheetSele
// TODO: @wzhudev: refactor the method to make it more readable
/**
- *
- * @param evt component point event
- * @param style selection style, Styles for user-customized selectors
- * @param _zIndex Stacking order of the selection object
- * @param rangeType Determines whether the selection is made normally according to the range or by rows and columns
+ * Handle pointer down event, then trigger selectionMoveStart$.
+ * @param evt
+ * @param _zIndex
+ * @param rangeType
+ * @param viewport
+ * @param scrollTimerType
*/
// eslint-disable-next-line max-lines-per-function, complexity
protected _onPointerDown(
@@ -786,8 +796,10 @@ export class BaseSelectionRenderService extends Disposable implements ISheetSele
const { scaleX, scaleY } = scene.getAncestorScale();
if (rangeType === RANGE_TYPE.ROW) {
+ // eslint-disable-next-line no-param-reassign
offsetX = Number.POSITIVE_INFINITY;
} else if (rangeType === RANGE_TYPE.COLUMN) {
+ // eslint-disable-next-line no-param-reassign
offsetY = Number.POSITIVE_INFINITY;
}
diff --git a/packages/sheets-ui/src/services/selection/mobile-selection-render.service.ts b/packages/sheets-ui/src/services/selection/mobile-selection-render.service.ts
index e0fe180084..b277ff4bd3 100644
--- a/packages/sheets-ui/src/services/selection/mobile-selection-render.service.ts
+++ b/packages/sheets-ui/src/services/selection/mobile-selection-render.service.ts
@@ -25,6 +25,9 @@ import type {
Nullable,
Workbook,
} from '@univerjs/core';
+import type { IMouseEvent, IPointerEvent, IRenderContext, IRenderModule, Scene, Viewport } from '@univerjs/engine-render';
+import type { ISelectionWithCoordAndStyle, ISetSelectionsOperationParams, WorkbookSelections } from '@univerjs/sheets';
+import type { ISheetObjectParam } from '../../controllers/utils/component-tools';
import {
ICommandService,
IContextService,
@@ -35,13 +38,10 @@ import {
ThemeService,
toDisposable,
} from '@univerjs/core';
-import type { IMouseEvent, IPointerEvent, IRenderContext, IRenderModule, Scene, Viewport } from '@univerjs/engine-render';
import { ScrollTimer, ScrollTimerType, SHEET_VIEWPORT_KEY, Vector2 } from '@univerjs/engine-render';
-import type { ISelectionWithCoordAndStyle, ISetSelectionsOperationParams, WorkbookSelections } from '@univerjs/sheets';
import { convertSelectionDataToRange, DISABLE_NORMAL_SELECTIONS, SelectionMoveType, SetSelectionsOperation, SheetsSelectionsService } from '@univerjs/sheets';
import { IShortcutService } from '@univerjs/ui';
import { distinctUntilChanged, startWith } from 'rxjs';
-import type { ISheetObjectParam } from '../../controllers/utils/component-tools';
import { getCoordByOffset, getSheetObject } from '../../controllers/utils/component-tools';
import { isThisColSelected, isThisRowSelected } from '../../controllers/utils/selections-tools';
import { SheetScrollManagerService } from '../scroll-manager.service';
@@ -169,6 +169,7 @@ export class MobileSheetsSelectionRenderService extends BaseSelectionRenderServi
})
);
+ // in mobile version, create a selection when pointerup.
// do not use onPointerDown$, pointerDown would close popup
// see packages/ui/src/views/components/context-menu/ContextMenu.tsx
this.disposeWithMe(spreadsheetLeftTopPlaceholder?.onPointerUp$.subscribeEvent((_evt: IPointerEvent | IMouseEvent, state: EventState) => {
@@ -180,6 +181,7 @@ export class MobileSheetsSelectionRenderService extends BaseSelectionRenderServi
const selectionWithStyle = getAllSelection(skeleton);
const selectionData = attachSelectionWithCoord(selectionWithStyle, skeleton);
this._addSelectionControlBySelectionData(selectionData);
+ // pointerup --> create selection
this.refreshSelectionMoveStart();
state.stopPropagation();
@@ -385,7 +387,6 @@ export class MobileSheetsSelectionRenderService extends BaseSelectionRenderServi
* new selection control for mobile do one more thing: bind event for two control points.
* @param scene
* @param rangeType
- * @returns
*/
override newSelectionControl(scene: Scene, rangeType: RANGE_TYPE): MobileSelectionControl {
const selectionControls = this.getSelectionControls();
@@ -610,8 +611,10 @@ export class MobileSheetsSelectionRenderService extends BaseSelectionRenderServi
// const { rowHeaderWidth, columnHeaderHeight } = skeleton;
if (rangeType === RANGE_TYPE.ROW) {
+ // eslint-disable-next-line no-param-reassign
offsetX = Number.POSITIVE_INFINITY;
} else if (rangeType === RANGE_TYPE.COLUMN) {
+ // eslint-disable-next-line no-param-reassign
offsetY = Number.POSITIVE_INFINITY;
}
diff --git a/packages/sheets/src/commands/operations/selection.operation.ts b/packages/sheets/src/commands/operations/selection.operation.ts
index c87f6f1fbc..814819d25a 100644
--- a/packages/sheets/src/commands/operations/selection.operation.ts
+++ b/packages/sheets/src/commands/operations/selection.operation.ts
@@ -14,12 +14,11 @@
* limitations under the License.
*/
-import { CommandType } from '@univerjs/core';
import type { IOperation } from '@univerjs/core';
-
-import { getSelectionsService } from '../utils/selection-command-util';
import type { ISelectionWithStyle } from '../../basics/selection';
import type { SelectionMoveType } from '../../services/selections/selection-manager.service';
+import { CommandType } from '@univerjs/core';
+import { getSelectionsService } from '../utils/selection-command-util';
export interface ISetSelectionsOperationParams {
unitId: string;
diff --git a/packages/sheets/src/services/selections/selection-manager.service.ts b/packages/sheets/src/services/selections/selection-manager.service.ts
index 57b507b837..cfcba3e8fb 100644
--- a/packages/sheets/src/services/selections/selection-manager.service.ts
+++ b/packages/sheets/src/services/selections/selection-manager.service.ts
@@ -212,7 +212,7 @@ export class WorkbookSelections extends Disposable {
private readonly _selectionMoving$ = new Subject<Nullable<ISelectionWithStyle[]>>();
readonly selectionMoving$ = this._selectionMoving$.asObservable();
- private readonly _selectionMoveEnd$ = new BehaviorSubject<ISelectionWithStyle[]>([]);
+ readonly _selectionMoveEnd$ = new BehaviorSubject<ISelectionWithStyle[]>([]);
readonly selectionMoveEnd$ = this._selectionMoveEnd$.asObservable();
private readonly _selectionSet$ = new BehaviorSubject<ISelectionWithStyle[]>([]);