diff options
| author | bobzel <zzzman@gmail.com> | 2021-03-30 20:55:48 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2021-03-30 20:55:48 -0400 |
| commit | 8b92374feed3152cf4eaf4e82735897565d8b2dc (patch) | |
| tree | 8a6b5cb7faf057f00418f44b222f4e6ea7fcc447 /src/client/views/collections/collectionFreeForm | |
| parent | b14d30c0a3dee908d7a288f9894e5fff23af3652 (diff) | |
some code cleanup. Fixes for webbox and pdfbox to allow draggin out of annotation sidebar.
Diffstat (limited to 'src/client/views/collections/collectionFreeForm')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index 512ec81f8..0f8a438cd 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -622,8 +622,10 @@ export class CollectionFreeFormView extends CollectionSubView<PanZoomDocument, P onClick = (e: React.MouseEvent) => { if ((Math.abs(e.pageX - this._downX) < 3 && Math.abs(e.pageY - this._downY) < 3)) { - if (e.shiftKey && Date.now() - this._lastTap < 300) { // reset zoom of freeform view to 1-to-1 on a shift + double click - this.zoomSmoothlyAboutPt(this.getTransform().transformPoint(e.clientX, e.clientY), 1); + if (e.shiftKey) { + if (Date.now() - this._lastTap < 300) { // reset zoom of freeform view to 1-to-1 on a shift + double click + this.zoomSmoothlyAboutPt(this.getTransform().transformPoint(e.clientX, e.clientY), 1); + } e.stopPropagation(); e.preventDefault(); } |
