Skip to content

Commit 338fa35

Browse files
authored
Merge pull request zcreativelabs#66 from stevenliuyi/master
use new projection to calculate mouse position
2 parents 6618925 + 5fe9650 commit 338fa35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ZoomableGroup.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ class ZoomableGroup extends Component {
102102

103103
this.setState({
104104
zoom: nextProps.zoom,
105-
mouseX: centerChanged ? calculateMousePosition("x", projection, nextProps, nextProps.zoom, resizeFactorX) : mouseX * zoomFactor,
106-
mouseY: centerChanged ? calculateMousePosition("y", projection, nextProps, nextProps.zoom, resizeFactorY) : mouseY * zoomFactor,
105+
mouseX: centerChanged ? calculateMousePosition("x", nextProps.projection, nextProps, nextProps.zoom, resizeFactorX) : mouseX * zoomFactor,
106+
mouseY: centerChanged ? calculateMousePosition("y", nextProps.projection, nextProps, nextProps.zoom, resizeFactorY) : mouseY * zoomFactor,
107107
})
108108
}
109109
handleResize() {

0 commit comments

Comments
 (0)