aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionGrid
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-05-27 15:17:01 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-05-27 15:17:01 -0400
commitefaa44cacf9cf8506209c9bf1437e36828132eea (patch)
treee14f4b1609e73d8c81f95668c81b27886da50463 /src/client/views/collections/collectionGrid
parentae552bf33e197bf18989a821f726f2d5670f6647 (diff)
fixed layout and interactions of grid view
Diffstat (limited to 'src/client/views/collections/collectionGrid')
-rw-r--r--src/client/views/collections/collectionGrid/CollectionGridView.scss13
-rw-r--r--src/client/views/collections/collectionGrid/CollectionGridView.tsx37
2 files changed, 23 insertions, 27 deletions
diff --git a/src/client/views/collections/collectionGrid/CollectionGridView.scss b/src/client/views/collections/collectionGrid/CollectionGridView.scss
index 8f12c1a24..c0a2cbc22 100644
--- a/src/client/views/collections/collectionGrid/CollectionGridView.scss
+++ b/src/client/views/collections/collectionGrid/CollectionGridView.scss
@@ -4,11 +4,10 @@
width: 100%;
height: 100%;
flex-direction: column;
-
- .document-wrapper {
- display: flex;
- flex-direction: column;
- width: 100%;
- height: 100%;
- }
+}
+.collectionGridView_contents .document-wrapper {
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ 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 a55d5a8ac..03ba9d004 100644
--- a/src/client/views/collections/collectionGrid/CollectionGridView.tsx
+++ b/src/client/views/collections/collectionGrid/CollectionGridView.tsx
@@ -94,25 +94,22 @@ export class CollectionGridView extends CollectionSubView(GridSchema) {
}
getDisplayDoc(layout: Doc, dxf: () => Transform, width: () => number, height: () => number) {
- return <div style={{ display: "flex" }}>
- <ContentFittingDocumentView
- {...this.props}
- Document={layout}
- DataDoc={layout.resolvedDataDoc as Doc}
- NativeHeight={returnZero}
- NativeWidth={returnZero}
- addDocTab={this.addDocTab}
- backgroundColor={this.props.backgroundColor}
- ContainingCollectionDoc={this.props.Document}
- PanelWidth={width}
- PanelHeight={height}
- ScreenToLocalTransform={dxf}
- onClick={this.onChildClickHandler}
- renderDepth={this.props.renderDepth + 1}
- parentActive={this.props.active}
- display={"contents"}
- />
- </div>;
+ return <ContentFittingDocumentView
+ {...this.props}
+ Document={layout}
+ DataDoc={layout.resolvedDataDoc as Doc}
+ NativeHeight={returnZero}
+ NativeWidth={returnZero}
+ addDocTab={this.addDocTab}
+ backgroundColor={this.props.backgroundColor}
+ ContainingCollectionDoc={this.props.Document}
+ PanelWidth={width}
+ PanelHeight={height}
+ ScreenToLocalTransform={dxf}
+ onClick={this.onChildClickHandler}
+ renderDepth={this.props.renderDepth + 1}
+ parentActive={this.props.active}
+ />;
}
@@ -243,7 +240,7 @@ export class CollectionGridView extends CollectionSubView(GridSchema) {
pointerEvents: !this.props.isSelected() && this.props.renderDepth !== 0 && !this.props.ContainingCollectionView?._isChildActive && !SnappingManager.GetIsDragging() ? "none" : undefined
}}
ref={this.createDashEventsTarget}
- onPointerDown={e => e.stopPropagation()}
+ onPointerDown={e => { ((e.target as any)?.className.includes("react-resizable-handle")) && e.stopPropagation(); }}
>
<Grid
width={this.props.PanelWidth()}