From 8989aea023f5b796f1803b9a2eeabb1fbdb1c679 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Fri, 14 Apr 2017 00:38:04 -0400 Subject: [PATCH] Clicking a midpoint should be treated as a click on the parent way --- modules/behavior/select.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/behavior/select.js b/modules/behavior/select.js index 24de5487d..c91d45db1 100644 --- a/modules/behavior/select.js +++ b/modules/behavior/select.js @@ -75,9 +75,10 @@ export function behaviorSelect(context) { if (datum && datum.type === 'midpoint') { - // do nothing.. + datum = datum.parents[0]; + } - } else if (!(datum instanceof osmEntity)) { + if (!(datum instanceof osmEntity)) { // clicked nothing.. if (!isMultiselect && mode.id !== 'browse') { context.enter(modeBrowse(context));