diff options
author | bobzel <zzzman@gmail.com> | 2023-03-24 23:18:44 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-03-24 23:18:44 -0400 |
commit | fd71eb1a130058207b45cc6a1da0dbd97f6dd4f1 (patch) | |
tree | 631592149de2718591fd549b597c11113cd6a7a7 /src/client/views/StyleProvider.tsx | |
parent | 71f8f420ab5755bac8814ff3f5a96f2f01856b2d (diff) |
fixed showing keyValueBox when document opacity is 0 or it is hidden. fixed toggling link targets. fixed sorting and undoing schema view changes.
Diffstat (limited to 'src/client/views/StyleProvider.tsx')
-rw-r--r-- | src/client/views/StyleProvider.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/StyleProvider.tsx b/src/client/views/StyleProvider.tsx index d1e85a65b..1b5eb3342 100644 --- a/src/client/views/StyleProvider.tsx +++ b/src/client/views/StyleProvider.tsx @@ -146,6 +146,7 @@ export function DefaultStyleProvider(doc: Opt<Doc>, props: Opt<DocumentViewProps return ( (doc && !doc.presentationTargetDoc && + !props?.LayoutTemplateString?.includes(KeyValueBox.name) && props?.showTitle?.() !== '' && StrCast( doc._showTitle, @@ -169,7 +170,7 @@ export function DefaultStyleProvider(doc: Opt<Doc>, props: Opt<DocumentViewProps if (!backColor) return undefined; return lightOrDark(backColor); case StyleProp.Hidden: - return BoolCast(doc?.hidden); + return props?.LayoutTemplateString?.includes(KeyValueBox.name) ? false : BoolCast(doc?.hidden); case StyleProp.BorderRounding: return StrCast(doc?.[fieldKey + 'borderRounding'], StrCast(doc?.borderRounding, doc?._viewType === CollectionViewType.Pile ? '50%' : '')); case StyleProp.TitleHeight: @@ -288,7 +289,7 @@ export function DefaultStyleProvider(doc: Opt<Doc>, props: Opt<DocumentViewProps } case StyleProp.PointerEvents: const isInk = doc && StrCast(Doc.Layout(doc).layout).includes(InkingStroke.name); - if (MainView.Instance._exploreMode) return isInk ? 'visiblePainted' : 'all'; + if (MainView.Instance._exploreMode || doc?.unrendered) return isInk ? 'visiblePainted' : 'all'; if (doc?.pointerEvents) return StrCast(doc.pointerEvents); if (props?.contentPointerEvents) return StrCast(props.contentPointerEvents); if (props?.pointerEvents?.() === 'none') return 'none'; |