aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionView.tsx
diff options
context:
space:
mode:
authoranika-ahluwalia <anika.ahluwalia@gmail.com>2020-05-18 21:19:06 -0500
committeranika-ahluwalia <anika.ahluwalia@gmail.com>2020-05-18 21:19:06 -0500
commit18f166edfe42a4856a6fea659cb65fd79f00599f (patch)
treeb58f7b3bff1f7efd2284f59084701f68eb5460bc /src/client/views/collections/CollectionView.tsx
parentbcb3106513b5a7ddc1aac8b7e6a448de4c4ded21 (diff)
parent3f97c632bc13075a4c13a6485d2e53e6694b36fa (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into script_documents
Diffstat (limited to 'src/client/views/collections/CollectionView.tsx')
-rw-r--r--src/client/views/collections/CollectionView.tsx10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/client/views/collections/CollectionView.tsx b/src/client/views/collections/CollectionView.tsx
index acb66acdb..ee4755355 100644
--- a/src/client/views/collections/CollectionView.tsx
+++ b/src/client/views/collections/CollectionView.tsx
@@ -72,7 +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;
+ childOpacity?: () => number;
}
export interface CollectionRenderProps {
@@ -118,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];
@@ -495,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}>