aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/collections/collectionGrid/CollectionGridView.scss25
-rw-r--r--src/client/views/collections/collectionGrid/CollectionGridView.tsx4
-rw-r--r--src/client/views/collections/collectionGrid/Grid.tsx12
3 files changed, 28 insertions, 13 deletions
diff --git a/src/client/views/collections/collectionGrid/CollectionGridView.scss b/src/client/views/collections/collectionGrid/CollectionGridView.scss
index 3e139ac97..b88721b4d 100644
--- a/src/client/views/collections/collectionGrid/CollectionGridView.scss
+++ b/src/client/views/collections/collectionGrid/CollectionGridView.scss
@@ -3,7 +3,26 @@
// overflow-y: auto;
// }
-.collectionView {
- background-color: white;
- overflow-y: scroll;
+// .collectionView {// background-color: white;
+// overflow-y: scroll;
+// }
+
+
+.collectionGridView_contents {
+ display: flex;
+ overflow: hidden;
+ width: 100%;
+ height: 100%;
+ flex-direction: column;
+}
+
+.collectionGridView_contents .document-wrapper {
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ height: 100%;
+}
+
+.react-grid-layout.layout {
+ height: 100%
} \ No newline at end of file
diff --git a/src/client/views/collections/collectionGrid/CollectionGridView.tsx b/src/client/views/collections/collectionGrid/CollectionGridView.tsx
index fdd25558c..111ce4beb 100644
--- a/src/client/views/collections/collectionGrid/CollectionGridView.tsx
+++ b/src/client/views/collections/collectionGrid/CollectionGridView.tsx
@@ -281,7 +281,6 @@ export class CollectionGridView extends CollectionSubView(GridSchema) {
// console.log(layout[0].w);
// }
-
return (
<div className="collectionGridView-contents"
style={{
@@ -297,12 +296,11 @@ export class CollectionGridView extends CollectionSubView(GridSchema) {
width={this.props.PanelWidth()}
nodeList={contents}
layout={layout}
- transformScale={this.props.ScreenToLocalTransform().Scale}
numCols={this.props.Document.numCols as number}
rowHeight={this.props.Document.rowHeight as number}
setLayout={this.setLayout}
flex={this.props.Document.flexGrid as boolean}
- scale={1 / this.props.ScreenToLocalTransform().Scale}
+ scale={this.props.ScreenToLocalTransform().Scale}
/>
</div>
);
diff --git a/src/client/views/collections/collectionGrid/Grid.tsx b/src/client/views/collections/collectionGrid/Grid.tsx
index 423268d40..673f670a6 100644
--- a/src/client/views/collections/collectionGrid/Grid.tsx
+++ b/src/client/views/collections/collectionGrid/Grid.tsx
@@ -37,15 +37,11 @@ export default class Grid extends React.Component<GridProps> {
* @param layout `Layout[]`
*/
onLayoutChange(layout: Layout[]) {
- console.log("setting in grid component" + layout[0]?.w);
- // if (this.props.flex) {
this.props.setLayout(layout);
- // }
}
- Scale = 2
render() {
- console.log("In grid layout prop received value= " + this.props.layout?.[0]?.w);
+ console.log(this.props.scale);
return (
<GridLayout className="layout"
layout={this.props.layout}
@@ -57,8 +53,10 @@ export default class Grid extends React.Component<GridProps> {
useCSSTransforms={true}
margin={[10, 10]}
onLayoutChange={this.onLayoutChange}
- preventCollision={true}
- transformScale={this.props.scale}
+ preventCollision={false} // change this to true later
+ transformScale={0.8} // 1.2/scale
+ style={{ height: "100%", overflowY: "scroll" }}
+ // draggableHandle={".documentDecorations-resizer"}
>
{this.props.nodeList}
</GridLayout >