aboutsummaryrefslogtreecommitdiff
path: root/src/views/collections/CollectionFreeFormView.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-01-29 13:07:33 -0500
committerbob <bcz@cs.brown.edu>2019-01-29 13:07:33 -0500
commit0a1264837da6de1bd73637307cc9c52678efa20f (patch)
tree581e3c0c1a79ef40efc7babb093c4a15821dba83 /src/views/collections/CollectionFreeFormView.tsx
parent7bc8bf62d9c9ff8e388103d0faa75855d43b8e16 (diff)
cleaned up zooming
Diffstat (limited to 'src/views/collections/CollectionFreeFormView.tsx')
-rw-r--r--src/views/collections/CollectionFreeFormView.tsx4
1 files changed, 2 insertions, 2 deletions
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<CollectionViewProps>
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;