aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionGrid/Grid.tsx
diff options
context:
space:
mode:
authorusodhi <61431818+usodhi@users.noreply.github.com>2020-06-04 20:03:19 +0530
committerusodhi <61431818+usodhi@users.noreply.github.com>2020-06-04 20:03:19 +0530
commit78f70dbd2136aa8b7b05bacafc71a8a714462d29 (patch)
tree2180efc263449c178cf18bf0b5cd05d5af9b0a91 /src/client/views/collections/collectionGrid/Grid.tsx
parent4cdd53c1208cd17593e0ecdb34e89265760a6512 (diff)
slider added + wheel propagation prevented + fixed bug in changeListenerDisposer
Diffstat (limited to 'src/client/views/collections/collectionGrid/Grid.tsx')
-rw-r--r--src/client/views/collections/collectionGrid/Grid.tsx18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/client/views/collections/collectionGrid/Grid.tsx b/src/client/views/collections/collectionGrid/Grid.tsx
index 29bafda9b..df550e3c2 100644
--- a/src/client/views/collections/collectionGrid/Grid.tsx
+++ b/src/client/views/collections/collectionGrid/Grid.tsx
@@ -19,6 +19,7 @@ interface GridProps {
setLayout: Function;
transformScale: number;
childrenDraggable: boolean;
+ // deletePlaceholder: Function;
}
/**
@@ -27,9 +28,12 @@ interface GridProps {
@observer
export default class Grid extends React.Component<GridProps> {
+ // private dragging: boolean = false;
+
constructor(props: Readonly<GridProps>) {
super(props);
this.onLayoutChange = this.onLayoutChange.bind(this);
+ // this.onDrag = this.onDrag.bind(this);
}
/**
* If there has been a change in layout, calls a method in CollectionGridView to set the layouts on the Document.
@@ -39,8 +43,20 @@ export default class Grid extends React.Component<GridProps> {
this.props.setLayout(layout);
}
+ // onDrag(layout: Layout[],
+ // oldItem: Layout,
+ // newItem: Layout,
+ // placeholder: Layout,
+ // event: MouseEvent,
+ // element: HTMLElement) {
+ // this.props.deletePlaceholder(placeholder, event);
+ // console.log("Grid -> event", event.clientX)
+
+ // }
+
render() {
console.log(this.props.transformScale);
+
return (
<GridLayout className="layout"
layout={this.props.layout}
@@ -54,7 +70,7 @@ export default class Grid extends React.Component<GridProps> {
useCSSTransforms={true}
onLayoutChange={this.onLayoutChange}
preventCollision={true}
- transformScale={this.props.transformScale}
+ transformScale={this.props.transformScale} // still doesn't work :(
style={{ zIndex: 5 }}
>
{this.props.nodeList}