aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionView.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-05-20 17:42:02 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-05-20 17:42:02 -0400
commitc04da1528de48a1e911f5c8989f32bfd0138882b (patch)
tree1d1c4736821f2fe1dae0175b9ef0d7c47d1dfdb4 /src/client/views/collections/CollectionView.tsx
parent2af870505bbd181ec0d121439da5dad9a0bcddcc (diff)
parent0460e38b8d1136983c7f36ae1cdf466296345065 (diff)
merged & fixed some interaction issues with comparisonBox
Diffstat (limited to 'src/client/views/collections/CollectionView.tsx')
-rw-r--r--src/client/views/collections/CollectionView.tsx9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/client/views/collections/CollectionView.tsx b/src/client/views/collections/CollectionView.tsx
index 3b2e5e4fc..ee4755355 100644
--- a/src/client/views/collections/CollectionView.tsx
+++ b/src/client/views/collections/CollectionView.tsx
@@ -72,6 +72,7 @@ export interface CollectionViewCustomProps {
filterAddDocument: (doc: Doc | Doc[]) => boolean; // allows a document that renders a Collection view to filter or modify any documents added to the collection (see PresBox for an example)
childLayoutTemplate?: () => Opt<Doc>; // specify a layout Doc template to use for children of the collection
childLayoutString?: string; // specify a layout string to use for children of the collection
+ childOpacity?: () => number;
}
export interface CollectionRenderProps {
@@ -117,10 +118,8 @@ export class CollectionView extends Touchable<FieldViewProps & CollectionViewCus
@action.bound
addDocument = (doc: Doc | Doc[]): boolean => {
- if (doc instanceof Doc) {
- if (this.props.filterAddDocument?.(doc) === false) {
- return false;
- }
+ if (this.props.filterAddDocument?.(doc) === false) {
+ return false;
}
const docs = doc instanceof Doc ? [doc] : doc;
const targetDataDoc = this.props.Document[DataSym];
@@ -494,7 +493,7 @@ export class CollectionView extends Touchable<FieldViewProps & CollectionViewCus
return (<div className={"collectionView"}
style={{
pointerEvents: this.props.Document.isBackground ? "none" : undefined,
- boxShadow: this.props.Document.isBackground || this.collectionViewType === CollectionViewType.Linear ? undefined :
+ boxShadow: Doc.UserDoc().renderStyle === "comic" || this.props.Document.isBackground || this.collectionViewType === CollectionViewType.Linear ? undefined :
`${Cast(Doc.UserDoc().activeWorkspace, Doc, null)?.darkScheme ? "rgb(30, 32, 31)" : "#9c9396"} ${StrCast(this.props.Document.boxShadow, "0.2vw 0.2vw 0.8vw")}`
}}
onContextMenu={this.onContextMenu}>