Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: refactor core package to DI pattern and remove Context #45

Merged
merged 6 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: remove dependency on context on Range
  • Loading branch information
Wenzhao Hu committed Aug 10, 2023
commit 70a63a9497e6ade923723b08858506989d7247c9
4 changes: 2 additions & 2 deletions packages/core/src/Sheets/Domain/Freeze.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class Freeze {
}

setFrozenColumns(columns: number): Worksheet {
const { _context, _commandManager } = this;
const { _commandManager } = this;
const configure = {
actionName: ACTION_NAMES.SET_FROZEN_COLUMNS_ACTION,
sheetId: this._worksheet.getSheetId(),
Expand All @@ -35,7 +35,7 @@ export class Freeze {
}

setFrozenRows(rows: number): Worksheet {
const { _context, _commandManager } = this;
const { _commandManager } = this;
const configure = {
actionName: ACTION_NAMES.SET_FROZEN_ROWS_ACTION,
sheetId: this._worksheet.getSheetId(),
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/Sheets/Domain/NamedRange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export class NamedRange {
* Deletes this named range.
*/
remove(namedRangeId: string): void {
const { _context, _workbook, _commandManager } = this;
const { _workbook, _commandManager } = this;

// Organize action data
const actionData: IDeleteNamedRangeActionData = {
Expand Down
Loading