From 9ed6d7932876cb7654ad154d028ba41bef12a7b5 Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Tue, 26 Sep 2017 16:57:47 +0200 Subject: Fix line overflow --- src/components/app/map/MapStageComponent.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/app/map/MapStageComponent.js b/src/components/app/map/MapStageComponent.js index 271ae64f..b8e3c3f7 100644 --- a/src/components/app/map/MapStageComponent.js +++ b/src/components/app/map/MapStageComponent.js @@ -58,7 +58,9 @@ class MapStageComponent extends React.Component { x: this.state.mouseX / this.props.mapScale - this.props.mapPosition.x / this.props.mapScale, y: this.state.mouseY / this.props.mapScale - this.props.mapPosition.y / this.props.mapScale, }; - const newScale = e.deltaY < 0 ? this.props.mapScale * MAP_SCALE_PER_EVENT : this.props.mapScale / MAP_SCALE_PER_EVENT; + const newScale = e.deltaY < 0 ? + this.props.mapScale * MAP_SCALE_PER_EVENT : + this.props.mapScale / MAP_SCALE_PER_EVENT; const boundedScale = Math.min(Math.max(MAP_MIN_SCALE, newScale), MAP_MAX_SCALE); const newX = -(mousePointsTo.x - this.state.mouseX / boundedScale) * boundedScale; -- cgit v1.2.3