From 11dc86ca9bb89b355ae712b45a12a0e1cc9626c7 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Mon, 11 Feb 2019 09:59:43 -0500 Subject: [PATCH 1/2] Add check for entity geometry type in allowsVertex function (re: #5875) --- modules/presets/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/presets/index.js b/modules/presets/index.js index 3f832b1fa..bf2452fae 100644 --- a/modules/presets/index.js +++ b/modules/presets/index.js @@ -78,6 +78,7 @@ export function presetIndex() { }; all.allowsVertex = function(entity, resolver) { + if (entity.type !== 'node') return false; return resolver.transient(entity, 'vertexMatch', function() { var vertexPresets = _index.vertex; var match; From 151e2685d4d75323427c8cdfa7104d264fc6bb36 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Mon, 11 Feb 2019 10:00:59 -0500 Subject: [PATCH 2/2] Force selectedIDs to be visible (re: #5880) --- modules/modes/select.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/modes/select.js b/modules/modes/select.js index 4289a0dc1..10703c4f6 100644 --- a/modules/modes/select.js +++ b/modules/modes/select.js @@ -239,6 +239,8 @@ export function modeSelect(context, selectedIDs) { mode.enter = function() { if (!checkSelectedIDs()) return; + context.features().forceVisible(selectedIDs); + var operations = _without(_values(Operations), Operations.operationDelete) .map(function(o) { return o(selectedIDs, context); }) .filter(function(o) { return o.available(); }); @@ -546,6 +548,7 @@ export function modeSelect(context, selectedIDs) { context.map().on('drawn.select', null); context.ui().sidebar.hide(); + context.features().forceVisible([]); };