aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2020-02-11 06:21:39 -0500
committerSam Wilkins <samwilkins333@gmail.com>2020-02-11 06:21:39 -0500
commit4af6916f1f68b879e11e38b4d2a3f9a0708ac979 (patch)
tree22622ff41f8d16a15fdd475a85a556dfc2309f79 /src/client/views/collections
parent3817c901191e73c8c141a52e202ded0fd12abf6c (diff)
factored out image resizing, fixed back button, importer script, tooltips on range sliders
Diffstat (limited to 'src/client/views/collections')
-rw-r--r--src/client/views/collections/CollectionTimeView.scss17
-rw-r--r--src/client/views/collections/CollectionTimeView.tsx12
2 files changed, 19 insertions, 10 deletions
diff --git a/src/client/views/collections/CollectionTimeView.scss b/src/client/views/collections/CollectionTimeView.scss
index 02ef4e2d2..2dffb3ea0 100644
--- a/src/client/views/collections/CollectionTimeView.scss
+++ b/src/client/views/collections/CollectionTimeView.scss
@@ -1,21 +1,26 @@
-.collectionTimeView, .collectionTimeView-pivot {
+.collectionTimeView,
+.collectionTimeView-pivot {
display: flex;
flex-direction: row;
position: absolute;
height: 100%;
width: 100%;
overflow: hidden;
+
.collectionTimeView-backBtn {
background: green;
display: inline;
margin-right: 20px;
}
+
.collectionFreeform-customText {
text-align: left;
}
+
.collectionFreeform-customDiv {
position: absolute;
}
+
.collectionTimeView-thumb {
position: absolute;
width: 30px;
@@ -28,14 +33,17 @@
border-radius: 9px;
opacity: 0.25;
}
+
.collectionTimeView-thumb-min {
- margin-left:25%;
+ margin-left: 25%;
}
+
.collectionTimeView-thumb-max {
- margin-left:75%;
+ margin-left: 75%;
}
+
.collectionTimeView-thumb-mid {
- margin-left:50%;
+ margin-left: 50%;
}
.collectionTimeView-flyout {
@@ -118,6 +126,7 @@
left: -10px;
}
}
+
.collectionTimeView-pivot {
.collectionFreeform-customText {
text-align: center;
diff --git a/src/client/views/collections/CollectionTimeView.tsx b/src/client/views/collections/CollectionTimeView.tsx
index db176d0bc..808144c18 100644
--- a/src/client/views/collections/CollectionTimeView.tsx
+++ b/src/client/views/collections/CollectionTimeView.tsx
@@ -46,7 +46,7 @@ export class CollectionTimeView extends CollectionSubView(doc => doc) {
this.props.Document._fitToBox = true;
}
if (!this.props.Document.onViewDefClick) {
- this.props.Document.onViewDefDivClick = ScriptField.MakeScript("pivotColumnClick(this,payload)", { payload: "any" })
+ this.props.Document.onViewDefDivClick = ScriptField.MakeScript("pivotColumnClick(this,payload)", { payload: "any" });
}
}
@@ -164,7 +164,7 @@ export class CollectionTimeView extends CollectionSubView(doc => doc) {
typeof (pair.layout[fieldKey]) === "string").map(fieldKey => keySet.add(fieldKey)));
Array.from(keySet).map(fieldKey =>
docItems.push({ description: ":" + fieldKey, event: () => this.props.Document._pivotField = fieldKey, icon: "compress-arrows-alt" }));
- docItems.push({ description: ":(null)", event: () => this.props.Document._pivotField = undefined, icon: "compress-arrows-alt" })
+ docItems.push({ description: ":(null)", event: () => this.props.Document._pivotField = undefined, icon: "compress-arrows-alt" });
ContextMenu.Instance.addItem({ description: "Pivot Fields ...", subitems: docItems, icon: "eye" });
const pt = this.props.ScreenToLocalTransform().inverse().transformPoint(x, y);
ContextMenu.Instance.displayMenu(x, y, ":");
@@ -282,9 +282,9 @@ export class CollectionTimeView extends CollectionSubView(doc => doc) {
const layoutItems: ContextMenuProps[] = [];
const doc = this.props.Document;
- layoutItems.push({ description: "Force Timeline", event: () => { doc._forceRenderEngine = "timeline" }, icon: "compress-arrows-alt" });
- layoutItems.push({ description: "Force Pivot", event: () => { doc._forceRenderEngine = "pivot" }, icon: "compress-arrows-alt" });
- layoutItems.push({ description: "Auto Time/Pivot layout", event: () => { doc._forceRenderEngine = undefined }, icon: "compress-arrows-alt" });
+ layoutItems.push({ description: "Force Timeline", event: () => { doc._forceRenderEngine = "timeline"; }, icon: "compress-arrows-alt" });
+ layoutItems.push({ description: "Force Pivot", event: () => { doc._forceRenderEngine = "pivot"; }, icon: "compress-arrows-alt" });
+ layoutItems.push({ description: "Auto Time/Pivot layout", event: () => { doc._forceRenderEngine = undefined; }, icon: "compress-arrows-alt" });
layoutItems.push({ description: "Sync with presentation", event: () => CollectionTimeView.SyncTimelineToPresentation(doc), icon: "compress-arrows-alt" });
ContextMenu.Instance.addItem({ description: "Pivot/Time Options ...", subitems: layoutItems, icon: "eye" });
@@ -331,7 +331,7 @@ export class CollectionTimeView extends CollectionSubView(doc => doc) {
<div className={"collectionTimeView" + (doTimeline ? "" : "-pivot")} onContextMenu={this.specificMenu}
style={{ height: `calc(100% - ${this.props.Document._chromeStatus === "enabled" ? 51 : 0}px)` }}>
<div className={"pivotKeyEntry"}>
- <button className="collectionTimeView-backBtn" style={{ width: 50, height: 20, background: "green" }}
+ <button className="collectionTimeView-backBtn"
onClick={action(() => {
let prevFilterIndex = NumCast(this.props.Document._prevFilterIndex);
if (prevFilterIndex > 0) {