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

fix: bugs in format painter #677

Merged
merged 7 commits into from
Dec 9, 2023
Merged
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
Next Next commit
fix: copy range style
  • Loading branch information
yuhongz committed Dec 8, 2023
commit 881995522df2d8e83c41f9d72e6a47da3c200736
18 changes: 14 additions & 4 deletions packages/sheets/src/services/selection-manager.service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { IRange, ISelectionCell, Nullable } from '@univerjs/core';
import type { IDisposable } from '@wendellhu/redi';
import { type IRange, type ISelectionCell, type Nullable, ThemeService } from '@univerjs/core';
import { type IDisposable, Inject } from '@wendellhu/redi';
import { BehaviorSubject, Subject } from 'rxjs';

import type { ISelectionStyle, ISelectionWithStyle } from '../basics/selection';
Expand Down Expand Up @@ -58,6 +58,16 @@ export class SelectionManagerService implements IDisposable {

private _dirty: boolean = true;

// get isSelectionEnabled() {
// return this._isSelectionEnabled;
// }

// get currentStyle() {
// return this._currentStyle;
// }

constructor(@Inject(ThemeService) private readonly _themeService: ThemeService) {}

getCurrent() {
return this._currentSelection;
}
Expand Down Expand Up @@ -258,8 +268,8 @@ export class SelectionManagerService implements IDisposable {
createCopyPasteSelection(): ISelectionStyle {
return {
strokeWidth: 2,
stroke: '#FFF000',
fill: 'rgba(0, 0, 0, 0.2)',
stroke: this._themeService.getCurrentTheme().primaryColor,
fill: 'rgba(178, 178, 178, 0.10)',
widgets: {},
hasAutoFill: false,
strokeDash: 8,
Expand Down