diff options
author | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-06-06 14:32:21 +0530 |
---|---|---|
committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-06-06 14:32:21 +0530 |
commit | 8d989f95fbe7cbd90f1cbff141f452314763844a (patch) | |
tree | c760b0aa48179addb09f62fbff6af0fbf413507b /src | |
parent | e30e5e4139be5312c46868f17de4dee5d516fd23 (diff) | |
parent | 9114ec801c3c539c0c8103c5be2b1f27b0e5e0bf (diff) |
Merge branch 'grid_view_secondary' of https://github.com/browngraphicslab/Dash-Web into grid_view_secondary
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/collections/collectionGrid/CollectionGridView.tsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/views/collections/collectionGrid/CollectionGridView.tsx b/src/client/views/collections/collectionGrid/CollectionGridView.tsx index e97cb9f0e..1fd1d3b05 100644 --- a/src/client/views/collections/collectionGrid/CollectionGridView.tsx +++ b/src/client/views/collections/collectionGrid/CollectionGridView.tsx @@ -177,7 +177,6 @@ export class CollectionGridView extends CollectionSubView(GridSchema) { onClick={this.onChildClickHandler} renderDepth={this.props.renderDepth + 1} parentActive={this.props.active} - display={"contents"} // this causes an issue- this is the reason the decorations box is weird with images and web boxes />; } @@ -304,7 +303,7 @@ export class CollectionGridView extends CollectionSubView(GridSchema) { return ( <div className="collectionGridView-contents" style={{ - pointerEvents: !this.props.isSelected() && this.props.renderDepth !== 0 && !this.props.ContainingCollectionView?._isChildActive && !SnappingManager.GetIsDragging() ? "none" : undefined + pointerEvents: !this.props.active() && !SnappingManager.GetIsDragging() ? "none" : undefined }} // onContextMenu={() => ContextMenu.Instance.addItem({ description: "test", event: () => console.log("test"), icon: "rainbow" })} ref={this.createDashEventsTarget} @@ -329,7 +328,10 @@ export class CollectionGridView extends CollectionSubView(GridSchema) { } <div className="collectionGridView-gridContainer" ref={this.containerRef} - onScroll={action(e => this._scroll = e.currentTarget.scrollTop)} + onScroll={action(e => { + if (!this.props.isSelected()) e.currentTarget.scrollTop = this._scroll; + else this._scroll = e.currentTarget.scrollTop; + })} onWheel={e => e.stopPropagation()} > <input className="rowHeightSlider" type="range" value={NumCast(this.props.Document.rowHeight)} onPointerDown={this.onSliderDown} onPointerUp={this.onSliderUp} onChange={this.onSliderChange} style={{ width: this.props.PanelHeight() - 40 }} min={1} max={this.props.PanelHeight() - 40} onClick={() => !this.sliderDragged && console.log("clicking") && (this.sliderDragged = false)} /> |