aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/StyleProvider.tsx
diff options
context:
space:
mode:
authorSkitty1238 <157652284+Skitty1238@users.noreply.github.com>2025-06-02 14:18:20 -0400
committerSkitty1238 <157652284+Skitty1238@users.noreply.github.com>2025-06-02 14:18:20 -0400
commit83bfca49c38e12dc575b5037c8fac25f3c21d6c5 (patch)
treed3e66b45d0e95e51d2b6f2672fd367776f19db35 /src/client/views/StyleProvider.tsx
parente4b5aa5e72cca6dd51e9acf28017cde4233b5cc6 (diff)
parent76a21badf70c82388872ec5485858ab06e303bca (diff)
Merge branch 'master' into task_nodes_aarav
Diffstat (limited to 'src/client/views/StyleProvider.tsx')
-rw-r--r--src/client/views/StyleProvider.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/StyleProvider.tsx b/src/client/views/StyleProvider.tsx
index 9110e198f..b52f17102 100644
--- a/src/client/views/StyleProvider.tsx
+++ b/src/client/views/StyleProvider.tsx
@@ -154,7 +154,7 @@ export function DefaultStyleProvider(doc: Opt<Doc>, props: Opt<FieldViewProps &
const highlightStyle = ['solid', 'dashed', 'solid', 'solid', 'solid'][highlightIndex];
if (highlightIndex) {
return {
- highlightStyle: doc.isGroup ? "dotted": highlightStyle,
+ highlightStyle: Doc.IsFreeformGroup(doc) ? "dotted": highlightStyle,
highlightColor,
highlightIndex,
highlightStroke: BoolCast(layoutDoc?.layout_isSvg),
@@ -284,7 +284,7 @@ export function DefaultStyleProvider(doc: Opt<Doc>, props: Opt<FieldViewProps &
? SnappingManager.userBackgroundColor
: doc?.annotationOn
? '#00000010' // faint interior for collections on PDFs, images, etc
- : doc?.isGroup
+ : doc && Doc.IsFreeformGroup(doc)
? undefined
: doc?._type_collection === CollectionViewType.Stacking ?
(Colors.DARK_GRAY)
@@ -308,7 +308,7 @@ export function DefaultStyleProvider(doc: Opt<Doc>, props: Opt<FieldViewProps &
doc?.layout_boxShadow,
doc?._type_collection === CollectionViewType.Pile
? '4px 4px 10px 2px'
- : lockedPosition() || doc?.isGroup || LayoutTemplateString
+ : lockedPosition() || (doc && Doc.IsFreeformGroup(doc)) || LayoutTemplateString
? undefined // groups have no drop shadow -- they're supposed to be "invisible". LayoutString's imply collection is being rendered as something else (e.g., title of a Slide)
: `${Colors.DARK_GRAY} ${StrCast(doc.layout_boxShadow, '0.2vw 0.2vw 0.8vw')}`
);
@@ -338,7 +338,7 @@ export function DefaultStyleProvider(doc: Opt<Doc>, props: Opt<FieldViewProps &
if (SnappingManager.ExploreMode || doc?.layout_unrendered) return isInk() ? 'visiblePainted' : 'all';
if (pointerEvents?.() === 'none') return 'none';
if (opacity() === 0) return 'none';
- if (isGroupActive?.() ) return isInk() ? 'visiblePainted': (doc?.isGroup ) ? undefined: 'all';
+ if (isGroupActive?.()) return isInk() ? 'visiblePainted': doc && Doc.IsFreeformGroup(doc) ? undefined: 'all';
if (isDocumentActive?.()) return isInk() ? 'visiblePainted' : 'all';
return undefined; // fixes problem with tree view elements getting pointer events when the tree view is not active
case StyleProp.Decorations: {