mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-06 00:41:39 +08:00
feat(editor): add feature flag service (#9592)
This commit is contained in:
@@ -4,6 +4,7 @@ import type {
|
||||
TextAlign,
|
||||
TextVerticalAlign,
|
||||
} from '@blocksuite/affine-model';
|
||||
import { FeatureFlagService } from '@blocksuite/affine-shared/services';
|
||||
import type { Bound, SerializedXYWH } from '@blocksuite/global/utils';
|
||||
import { deltaInsertsToChunks } from '@blocksuite/inline';
|
||||
|
||||
@@ -68,9 +69,9 @@ export function drawGeneralShape(
|
||||
const { blur, offsetX, offsetY, color } = shapeModel.shadow;
|
||||
const scale = ctx.getTransform().a;
|
||||
|
||||
const enableShadowBlur = shapeModel.surface.doc.awarenessStore.getFlag(
|
||||
'enable_shape_shadow_blur'
|
||||
);
|
||||
const enableShadowBlur = shapeModel.surface.doc
|
||||
.get(FeatureFlagService)
|
||||
.getFlag('enable_shape_shadow_blur');
|
||||
|
||||
// hard shadow, or soft shadow if `enable_shape_shadow_blur` is true
|
||||
// see comment of `shape.shadow` in `ShapeElementModel`
|
||||
|
||||
Reference in New Issue
Block a user