From 0a1264837da6de1bd73637307cc9c52678efa20f Mon Sep 17 00:00:00 2001 From: bob Date: Tue, 29 Jan 2019 13:07:33 -0500 Subject: cleaned up zooming --- src/views/collections/CollectionFreeFormView.scss | 2 +- src/views/collections/CollectionFreeFormView.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/views/collections') diff --git a/src/views/collections/CollectionFreeFormView.scss b/src/views/collections/CollectionFreeFormView.scss index 1563712fb..870e48556 100644 --- a/src/views/collections/CollectionFreeFormView.scss +++ b/src/views/collections/CollectionFreeFormView.scss @@ -4,7 +4,7 @@ left: 0; overflow: hidden; .collectionfreeformview { - position: relative; + position: absolute; top: 0; left: 0; } diff --git a/src/views/collections/CollectionFreeFormView.tsx b/src/views/collections/CollectionFreeFormView.tsx index 479d883d6..a1224f4da 100644 --- a/src/views/collections/CollectionFreeFormView.tsx +++ b/src/views/collections/CollectionFreeFormView.tsx @@ -109,11 +109,11 @@ export class CollectionFreeFormView extends React.Component onPointerWheel = (e: React.WheelEvent): void => { e.stopPropagation(); - let { LocalX, Ss, W, Panxx, Xx, LocalY, Panyy, Yy, ContainerX, ContainerY } = this.props.ContainingDocumentView!.TransformToLocalPoint(e.pageX, e.pageY); + let { LocalX, Ss, Panxx, Xx, LocalY, Panyy, Yy, ContainerX, ContainerY } = this.props.ContainingDocumentView!.TransformToLocalPoint(e.pageX, e.pageY); var deltaScale = (1 - (e.deltaY / 1000)) * Ss; - var newContainerX = LocalX * deltaScale + W / 2 - W / 2 * deltaScale + Panxx + Xx; + var newContainerX = LocalX * deltaScale + Panxx + Xx; var newContainerY = LocalY * deltaScale + Panyy + Yy; let dx = ContainerX - newContainerX; -- cgit v1.2.3-70-g09d2