Skip to content

Commit

Permalink
chore: better code
Browse files Browse the repository at this point in the history
  • Loading branch information
lumixraku committed Nov 21, 2024
1 parent 04600ce commit 81d9dc7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,11 @@ export class SheetClipboardController extends RxDisposable {
let docSelectionRenderService = this._renderManagerService.getRenderById(DOCS_NORMAL_EDITOR_UNIT_ID_KEY)?.with(DocSelectionRenderService);

if (docSelectionRenderService) {
// console.log('SheetClipboardController init doc selection service', docSelectionRenderService);
sheetPasteShortKeyFn(docSelectionRenderService);
} else {
// console.log('SheetClipboardController init doc selection service DOCS_NORMAL_EDITOR_UNIT_ID_KEY', DOCS_NORMAL_EDITOR_UNIT_ID_KEY);
this._renderManagerService.created$.subscribe((renderer) => {
if (renderer.unitId === DOCS_NORMAL_EDITOR_UNIT_ID_KEY) {
console.log('SheetClipboardController init doc selection service $$$$', renderer);
docSelectionRenderService = this._renderManagerService.getRenderById(DOCS_NORMAL_EDITOR_UNIT_ID_KEY)?.with(DocSelectionRenderService);
console.log('SheetClipboardController init doc selection service $$$$$', docSelectionRenderService);
if (docSelectionRenderService) {
sheetPasteShortKeyFn(docSelectionRenderService);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/sheets-ui/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ export class UniverSheetsUIPlugin extends Plugin {
[AutoHeightController],
[AutoWidthController],
[FormulaEditorController],
[SheetClipboardController],
[SheetsRenderService],
[SheetUIController],
[StatusBarController],
Expand Down Expand Up @@ -241,6 +240,7 @@ export class UniverSheetsUIPlugin extends Plugin {
[MoveRangeRenderController],

// editor
[SheetClipboardController],
[EditorBridgeRenderController],
[EditingRenderController],

Expand Down

0 comments on commit 81d9dc7

Please sign in to comment.