From 45635f7cdcd06dd7fab55774fcf5359f48263c40 Mon Sep 17 00:00:00 2001 From: Jon D Date: Sat, 5 Nov 2016 18:32:26 +0000 Subject: [PATCH] Basic horizontal flip works, but midpoint seems incorrect --- modules/actions/flip.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/actions/flip.js b/modules/actions/flip.js index 979a805c9..8e4f7c92d 100644 --- a/modules/actions/flip.js +++ b/modules/actions/flip.js @@ -32,8 +32,8 @@ export function actionFlip(wayId, isVertical, projection) { node.loc[1] - midPoint : node.loc[0] - midPoint; return isVertical ? - node.move(projection.translate(0, delta)) : - node.move(projection.translate(delta, 0)); + node.move([node.loc[0], node.loc[1]-(2*delta)]) : + node.move([node.loc[0]-(2*delta), node.loc[1]]); }) // Chain together consecutive updates to the graph for each updated node and return .reduce(function (accGraph, value) {