@univerjs/sheets-conditional-formatting v0.5.4


Class: ConditionalFormattingViewModel

Defined in: sheets-conditional-formatting/src/models/conditional-formatting-view-model.ts:33

Extends

Constructors

new ConditionalFormattingViewModel()

new ConditionalFormattingViewModel(
   _injector, 
   _conditionalFormattingRuleModel, 
   _conditionalFormattingFormulaService, 
   _univerInstanceService): ConditionalFormattingViewModel

Defined in: sheets-conditional-formatting/src/models/conditional-formatting-view-model.ts:49

Parameters

ParameterType
_injectorInjector
_conditionalFormattingRuleModelConditionalFormattingRuleModel
_conditionalFormattingFormulaServiceConditionalFormattingFormulaService
_univerInstanceServiceIUniverInstanceService

Returns

ConditionalFormattingViewModel

Overrides

Disposable.constructor

Properties

PropertyModifierTypeDefault valueDescriptionInherited fromDefined in
_disposedprotectedbooleanfalse-Disposable._disposedcore/src/shared/lifecycle.ts:96
markDirty$publicObservable<{ cfId: string; isImmediately: boolean; subUnitId: string; unitId: string; }>undefinedThe rendering layer listens to this variable to determine whether a reRender is necessary. Memberof ConditionalFormattingViewModel-sheets-conditional-formatting/src/models/conditional-formatting-view-model.ts:48
markRuleDirtypublic(unitId: string, subUnitId: string, cfId: string, isNeedResetPreComputingCache: boolean) => voidundefinedFor the same condition format being marked dirty multiple times at the same time, it will cause the style cache to be cleared, thereby causing the screen to flicker. Here,multiple dirties are merged into one..-sheets-conditional-formatting/src/models/conditional-formatting-view-model.ts:133

Methods

dispose()

dispose(): void

Defined in: core/src/shared/lifecycle.ts:109

Returns

void

Inherited from

Disposable.dispose


disposeWithMe()

disposeWithMe(disposable): IDisposable

Defined in: core/src/shared/lifecycle.ts:99

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe


ensureNotDisposed()

protected ensureNotDisposed(): void

Defined in: core/src/shared/lifecycle.ts:103

Returns

void

Inherited from

Disposable.ensureNotDisposed


getCellCfs()

getCellCfs(
   unitId, 
   subUnitId, 
   row, 
   col): 
  | undefined
  | {
  cfId: string;
  priority: number;
  result: any;
 }[]

Defined in: sheets-conditional-formatting/src/models/conditional-formatting-view-model.ts:71

Parameters

ParameterType
unitIdstring
subUnitIdstring
rownumber
colnumber

Returns

| undefined | { cfId: string; priority: number; result: any; }[]


setCacheLength()

setCacheLength(length): void

Defined in: sheets-conditional-formatting/src/models/conditional-formatting-view-model.ts:271

Parameters

ParameterTypeDefault value
lengthnumberCONDITIONAL_FORMATTING_VIEWPORT_CACHE_LENGTH

Returns

void