From dd16112aa3b553f50d00575ad71170758dee82f1 Mon Sep 17 00:00:00 2001 From: Jon D Date: Sat, 5 Nov 2016 18:48:11 +0000 Subject: [PATCH] Fix midpoint --- modules/actions/flip.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/actions/flip.js b/modules/actions/flip.js index 8e4f7c92d..18d6e517a 100644 --- a/modules/actions/flip.js +++ b/modules/actions/flip.js @@ -19,7 +19,7 @@ export function actionFlip(wayId, isVertical, projection) { const leftOrTop = isVertical ? boundingRect[1] : boundingRect[0]; const rightOrBottom = isVertical ? boundingRect[3] : boundingRect[2]; // Determine the mid-point that we will flip on - const midPoint = leftOrTop + (rightOrBottom - leftOrTop); + const midPoint = leftOrTop + ((rightOrBottom - leftOrTop) / 2); // Obtain all of the nodes on the way, iterate over them to translate then aggreate up return _(targetWay.nodes)