diff options
| author | bobzel <zzzman@gmail.com> | 2019-02-12 22:01:19 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2019-02-12 22:01:19 -0500 |
| commit | 9c25c122a0f2728db8c1bd9b622ce924086105f6 (patch) | |
| tree | a97a95cea1a9e21d222b913e3816262ec083c423 /src/client/views/collections | |
| parent | 35fcac231e4ab4dda2c47d7a3a7cf038157465eb (diff) | |
cleaned up TransformToLocalPoint
Diffstat (limited to 'src/client/views/collections')
| -rw-r--r-- | src/client/views/collections/CollectionFreeFormView.tsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/views/collections/CollectionFreeFormView.tsx b/src/client/views/collections/CollectionFreeFormView.tsx index 0262e4a6c..8b9fa8a87 100644 --- a/src/client/views/collections/CollectionFreeFormView.tsx +++ b/src/client/views/collections/CollectionFreeFormView.tsx @@ -124,9 +124,10 @@ export class CollectionFreeFormView extends CollectionViewBase { // if (modes[e.deltaMode] == 'pixels') coefficient = 50; // else if (modes[e.deltaMode] == 'lines') coefficient = 1000; // This should correspond to line-height?? - let { LocalX, Ss, Xx, LocalY, Yy, ContainerX, ContainerY } = this.props.ContainingDocumentView!.TransformToLocalPoint(e.pageX, e.pageY); - - var deltaScale = (1 - (e.deltaY / coefficient)) * Ss; + let { LocalX, LocalY, ContainerX, ContainerY } = this.props.ContainingDocumentView!.TransformToLocalPoint(e.pageX, e.pageY); + var Xx = this.props.ContainingDocumentView!.LeftCorner(); + var Yy = this.props.ContainingDocumentView!.TopCorner(); + var deltaScale = (1 - (e.deltaY / coefficient)) * this.props.ContainingDocumentView!.props.Document.GetNumber(KeyStore.Scale, 1); var newDeltaScale = this.isAnnotationOverlay ? Math.max(1, deltaScale) : deltaScale; this.props.DocumentForCollection.SetNumber(KeyStore.Scale, newDeltaScale); |
