diff options
| author | bobzel <zzzman@gmail.com> | 2020-09-28 09:29:09 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2020-09-28 09:29:09 -0400 |
| commit | 1e7796692551ba71cd755a122697327f4d85ccde (patch) | |
| tree | 5571fc297f315188dc2859452073875d876e0c6b /src/client/views/collections/CollectionStackingView.tsx | |
| parent | 0ba42a96a69f79b388c3279d683636f8cf6b0eab (diff) | |
fixed follow link to scroll stacking/masonry views properly.
Diffstat (limited to 'src/client/views/collections/CollectionStackingView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionStackingView.tsx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/client/views/collections/CollectionStackingView.tsx b/src/client/views/collections/CollectionStackingView.tsx index 8b2a30b12..7912cfc8e 100644 --- a/src/client/views/collections/CollectionStackingView.tsx +++ b/src/client/views/collections/CollectionStackingView.tsx @@ -176,9 +176,7 @@ export class CollectionStackingView extends CollectionSubView(StackingDocument) const localTop = this.props.ScreenToLocalTransform().transformPoint(0, top); smoothScroll(doc.presTransition || doc.presTransition === 0 ? NumCast(doc.presTransition) : 500, this._mainCont!, localTop[1] + this._mainCont!.scrollTop); } - afterFocus && setTimeout(() => { - if (afterFocus?.()) { } - }, 500); + afterFocus && setTimeout(() => afterFocus?.(), 500); } getDisplayDoc(doc: Doc, dxf: () => Transform, width: () => number) { @@ -495,10 +493,7 @@ export class CollectionStackingView extends CollectionSubView(StackingDocument) width: `${1 / this.scaling * 100}%`, transformOrigin: "top left", }} - onScroll={action(e => { - if (!this.props.isSelected(true) && this.props.renderDepth) e.currentTarget.scrollTop = this._scroll; - else this._scroll = e.currentTarget.scrollTop; - })} + onScroll={action(e => this._scroll = e.currentTarget.scrollTop)} onDrop={this.onExternalDrop.bind(this)} onContextMenu={this.onContextMenu} onWheel={e => this.props.active(true) && e.stopPropagation()} > |
