aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-11-19 12:29:33 -0500
committerbob <bcz@cs.brown.edu>2019-11-19 12:29:33 -0500
commite313d64c8bd1373ce3e8ec02fa73d3c97fc5e90b (patch)
treed69e0f61e28bc42ff24d43ad0575bd2bb62cf915 /src
parent185257e441cce6c0d599d95f6fe79cb3deef62d6 (diff)
minor cleanup. fix for collections being a background
Diffstat (limited to 'src')
-rw-r--r--src/client/views/InkingStroke.tsx22
-rw-r--r--src/client/views/Main.scss2
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.scss1
-rw-r--r--src/client/views/nodes/DocumentView.tsx3
4 files changed, 11 insertions, 17 deletions
diff --git a/src/client/views/InkingStroke.tsx b/src/client/views/InkingStroke.tsx
index 411b0d3a0..74211cc90 100644
--- a/src/client/views/InkingStroke.tsx
+++ b/src/client/views/InkingStroke.tsx
@@ -1,18 +1,14 @@
+import { computed } from "mobx";
import { observer } from "mobx-react";
-import { observable, trace, runInAction, computed } from "mobx";
-import { InkingControl } from "./InkingControl";
-import React = require("react");
-import { InkTool, InkField, InkData } from "../../new_fields/InkField";
-import "./InkingStroke.scss";
-import { AudioBox } from "./nodes/AudioBox";
-import { Doc, FieldResult } from "../../new_fields/Doc";
-import { createSchema, makeInterface, listSpec } from "../../new_fields/Schema";
import { documentSchema } from "../../new_fields/documentSchemas";
+import { InkData, InkField, InkTool } from "../../new_fields/InkField";
+import { makeInterface } from "../../new_fields/Schema";
+import { Cast } from "../../new_fields/Types";
import { DocExtendableComponent } from "./DocComponent";
-import { FieldViewProps, FieldView } from "./nodes/FieldView";
-import { Transform } from "../util/Transform";
-import { Cast, FieldValue } from "../../new_fields/Types";
-import { List } from "../../new_fields/List";
+import { InkingControl } from "./InkingControl";
+import "./InkingStroke.scss";
+import { FieldView, FieldViewProps } from "./nodes/FieldView";
+import React = require("react");
type InkDocument = makeInterface<[typeof documentSchema]>;
const InkDocument = makeInterface(documentSchema);
@@ -40,7 +36,7 @@ export class InkingStroke extends DocExtendableComponent<FieldViewProps, InkDocu
render() {
// let pathData = this.parseData(this.props.line);
- let data: InkData = Cast(this.Document.data, InkField) ?.inkData ?? [];
+ let data: InkData = Cast(this.Document.data, InkField)?.inkData ?? [];
let xs = data.map(p => p.x);
let ys = data.map(p => p.y);
let left = Math.min(...xs);
diff --git a/src/client/views/Main.scss b/src/client/views/Main.scss
index 9cbe6e144..465527468 100644
--- a/src/client/views/Main.scss
+++ b/src/client/views/Main.scss
@@ -27,7 +27,7 @@ div {
pointer-events: none;
border-radius: inherit;
position: inherit;
- background: inherit;
+ // background: inherit;
}
p {
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.scss b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.scss
index db36c4391..d2731703f 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.scss
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.scss
@@ -45,7 +45,6 @@
// linear-gradient(to bottom, $light-color-secondary 1px, transparent 1px);
// background-size: 30px 30px;
// }
- opacity: 0.99;
border: 0px solid $light-color-secondary;
border-radius: inherit;
box-sizing: border-box;
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index da4489bef..865ec8d9b 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -645,7 +645,7 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
const ruleRounding = this.props.ruleProvider ? StrCast(this.props.ruleProvider["ruleRounding_" + this.Document.heading]) : undefined;
const colorSet = this.setsLayoutProp("backgroundColor");
const clusterCol = this.props.ContainingCollectionDoc && this.props.ContainingCollectionDoc.clusterOverridesDefaultBackground;
- const backgroundColor = this.Document.isBackground || (clusterCol && !colorSet) ?
+ const backgroundColor = (clusterCol && !colorSet) ?
this.props.backgroundColor(this.Document) || StrCast(this.layoutDoc.backgroundColor) :
ruleColor && !colorSet ? ruleColor : StrCast(this.layoutDoc.backgroundColor) || this.props.backgroundColor(this.Document);
@@ -672,7 +672,6 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
background: this.layoutDoc.type === DocumentType.FONTICON || this.layoutDoc.viewType === CollectionViewType.Linear ? undefined : backgroundColor,
width: animwidth,
height: animheight,
- //transform: `scale(${this.layoutDoc.fitWidth ? 1 : this.props.ContentScaling()})`,
opacity: this.Document.opacity
}} >
{this.innards}