aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-02-25 02:53:38 -0500
committerTyler Schicke <tyler_schicke@brown.edu>2019-02-25 02:53:38 -0500
commit47152d960e5b79f395fb4ecc421e5aac0c12883e (patch)
treea741e3c0c476d876e14ce0859cd04eddad2885d6 /src/client/views/collections
parent1a32bdca177faf5a3d99bcb45aaf596ba8c706a8 (diff)
parente57c8ed3944bf737afdb2f564d159a53f8a6b1c6 (diff)
Merge branch 'master' of github-tsch-brown:browngraphicslab/Dash-Web into authentication
Diffstat (limited to 'src/client/views/collections')
-rw-r--r--src/client/views/collections/CollectionDockingView.tsx2
-rw-r--r--src/client/views/collections/CollectionFreeFormView.scss9
-rw-r--r--src/client/views/collections/CollectionFreeFormView.tsx6
-rw-r--r--src/client/views/collections/CollectionSchemaView.scss76
-rw-r--r--src/client/views/collections/CollectionSchemaView.tsx7
5 files changed, 52 insertions, 48 deletions
diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx
index 86dc66e39..2230ec14f 100644
--- a/src/client/views/collections/CollectionDockingView.tsx
+++ b/src/client/views/collections/CollectionDockingView.tsx
@@ -285,7 +285,7 @@ export class DockedFrameRenderer extends React.Component<DockedFrameProps> {
if (!this._document)
return (null);
var content =
- <div ref={this._mainCont}>
+ <div className="collectionDockingView-content" ref={this._mainCont}>
<DocumentView key={this._document.Id} Document={this._document}
AddDocument={undefined}
RemoveDocument={undefined}
diff --git a/src/client/views/collections/CollectionFreeFormView.scss b/src/client/views/collections/CollectionFreeFormView.scss
index e682b9815..5f930d135 100644
--- a/src/client/views/collections/CollectionFreeFormView.scss
+++ b/src/client/views/collections/CollectionFreeFormView.scss
@@ -1,12 +1,15 @@
.collectionfreeformview-container {
-
::-webkit-scrollbar {
-webkit-appearance: none;
width: 10px;
}
::-webkit-scrollbar-thumb {
border-radius: 5px;
- background-color: rgba(0,0,0,.5);
+ background-color: rgba(0, 0, 0, .5);
+ }
+ .collectionfreeformview>.jsx-parser {
+ position: absolute;
+ height: 100%;
}
border-style: solid;
box-sizing: border-box;
@@ -20,7 +23,7 @@
position: absolute;
top: 0;
left: 0;
- width:100%;
+ width: 100%;
height: 100%
}
} \ No newline at end of file
diff --git a/src/client/views/collections/CollectionFreeFormView.tsx b/src/client/views/collections/CollectionFreeFormView.tsx
index cb6668634..c40da6eaa 100644
--- a/src/client/views/collections/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/CollectionFreeFormView.tsx
@@ -217,12 +217,6 @@ export class CollectionFreeFormView extends CollectionViewBase {
render() {
const panx: number = this.props.Document.GetNumber(KeyStore.PanX, 0);
const pany: number = this.props.Document.GetNumber(KeyStore.PanY, 0);
- var overlay = this.overlayView ?
- <div style={{ position: "absolute", width: "100%", height: "100%" }}>
- {this.overlayView}
- </div>
- :
- (null);
return (
<div className="collectionfreeformview-container"
onPointerDown={this.onPointerDown}
diff --git a/src/client/views/collections/CollectionSchemaView.scss b/src/client/views/collections/CollectionSchemaView.scss
index ba9afee62..b02d528a0 100644
--- a/src/client/views/collections/CollectionSchemaView.scss
+++ b/src/client/views/collections/CollectionSchemaView.scss
@@ -1,4 +1,3 @@
-
.collectionSchemaView-container {
border-style: solid;
box-sizing: border-box;
@@ -11,36 +10,54 @@
}
::-webkit-scrollbar-thumb {
border-radius: 5px;
- background-color: rgba(0,0,0,.5);
- }
-
- .collectionfreeformview-container {
- border-width: 0px;
- .collectionfreeformview > .jsx-parser{
- position:absolute
- }
- }
- .imageBox-cont {
- position:relative;
- max-height:100%;
+ background-color: rgba(0, 0, 0, .5);
}
.ReactTable {
- position: absolute;
- // display: inline-block;
- // overflow: auto;
+ position: absolute; // display: inline-block;
+ // overflow: auto;
width: 100%;
height: 100%;
background: white;
box-sizing: border-box;
+ .rt-table {
+ overflow-y: auto;
+ overflow-x: auto;
+ height: 100%;
+ display: -webkit-inline-box;
+ direction: ltr; // direction:rtl;
+ // display:block;
+ }
+ .rt-tbody {
+ //direction: ltr;
+ direction: rtl;
+ }
+ .rt-tr-group {
+ direction: ltr;
+ }
+ .rt-td {
+ border-width: 1;
+ border-right-color: #aaa;
+ .imageBox-cont {
+ position: relative;
+ max-height: 100%;
+ }
+ .imageBox-cont img {
+ object-fit: contain;
+ max-width: 100%;
+ height: 100%
+ }
+ }
+ .rt-tr-group {
+ border-width: 1;
+ border-bottom-color: #aaa
+ }
}
.ReactTable .rt-table {
overflow-y: auto;
overflow-x: auto;
height: 100%;
-
display: -webkit-inline-box;
- direction: ltr;
- // direction:rtl;
+ direction: ltr; // direction:rtl;
// display:block;
}
.ReactTable .rt-tbody {
@@ -51,9 +68,10 @@
direction: ltr;
}
.ReactTable .rt-thead.-header {
- background:grey;
- }
- .ReactTable .rt-th, .ReactTable .rt-td {
+ background: grey;
+ }
+ .ReactTable .rt-th,
+ .ReactTable .rt-td {
max-height: 75px;
}
.ReactTable .rt-tbody .rt-tr-group:last-child {
@@ -61,24 +79,10 @@
border-bottom-style: solid;
border-bottom-width: 1;
}
- .ReactTable .rt-td {
- border-width: 1;
- border-right-color: #aaa
- }
- .ReactTable .rt-tr-group {
- border-width: 1;
- border-bottom-color: #aaa
- }
- .imageBox-cont img {
- object-fit: contain;
- height: 100%
- }
.documentView-node:first-child {
background: grey;
.imageBox-cont img {
object-fit: contain;
- max-width: 100%;
- height: 100%
}
}
}
diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx
index d2db93120..dc952ef82 100644
--- a/src/client/views/collections/CollectionSchemaView.tsx
+++ b/src/client/views/collections/CollectionSchemaView.tsx
@@ -16,6 +16,8 @@ import "./CollectionSchemaView.scss";
import { COLLECTION_BORDER_WIDTH } from "./CollectionView";
import { CollectionViewBase } from "./CollectionViewBase";
+// bcz: need to add drag and drop of rows and columns. This seems like it might work for rows: https://codesandbox.io/s/l94mn1q657
+
@observer
export class CollectionSchemaView extends CollectionViewBase {
private _mainCont = React.createRef<HTMLDivElement>();
@@ -140,7 +142,7 @@ export class CollectionSchemaView extends CollectionViewBase {
let content = this._selectedIndex == -1 || !selected ? (null) : (
<Measure onResize={this.setScaling}>
{({ measureRef }) =>
- <div ref={measureRef}>
+ <div className="collectionSchemaView-content" ref={measureRef}>
<DocumentView Document={selected}
AddDocument={this.props.addDocument} RemoveDocument={this.props.removeDocument}
isTopMost={false}
@@ -173,7 +175,8 @@ export class CollectionSchemaView extends CollectionViewBase {
}))}
column={{
...ReactTableDefaults.column,
- Cell: this.renderCell
+ Cell: this.renderCell,
+
}}
getTrProps={this.getTrProps}
/>