From fac292550709a552f4c3f9deef1005919424d9e8 Mon Sep 17 00:00:00 2001 From: Max Grossman Date: Mon, 13 May 2019 10:26:58 -0400 Subject: [PATCH] comments... ref #1425 --- modules/behavior/draw.js | 2 ++ modules/behavior/draw_way.js | 1 + modules/behavior/hover.js | 1 + 3 files changed, 4 insertions(+) diff --git a/modules/behavior/draw.js b/modules/behavior/draw.js index 9653523664..36a515ca55 100644 --- a/modules/behavior/draw.js +++ b/modules/behavior/draw.js @@ -126,6 +126,8 @@ export function behaviorDraw(context) { var target = d && d.properties && d.properties.entity; var _activeLayer = _find( Hoot.layers.loadedLayers, function(a, b) { return a.activeLayer === true ? a : null; }); + // for each if/elseif statment add boolean (is _activeLayer===target.mapId)... + if (target && target.type === 'node') { // Snap to a node if (_activeLayer.id === Number(target.mapId)) { console.log(target.name + ' (' + target.id + ')' + ' is an active layer' ); diff --git a/modules/behavior/draw_way.js b/modules/behavior/draw_way.js index e99da7b326..423a5a05d3 100644 --- a/modules/behavior/draw_way.js +++ b/modules/behavior/draw_way.js @@ -73,6 +73,7 @@ export function behaviorDrawWay(context, wayId, index, mode, startGraph) { function move(datum) { context.surface().classed('nope-disabled', d3_event.altKey); + // add one more boolean at end, is activeLayer===mapId var targetLoc = datum && datum.properties && datum.properties.entity && datum.properties.entity.loc; var targetNodes = datum && datum.properties && datum.properties.nodes; var loc = context.map().mouseCoordinates(); diff --git a/modules/behavior/hover.js b/modules/behavior/hover.js index b7bd503de4..ecf5e078de 100644 --- a/modules/behavior/hover.js +++ b/modules/behavior/hover.js @@ -140,6 +140,7 @@ export function behaviorHover(context) { return; } + // again, boolean, is entity.mapId === activeLayerId... var suppressed = _altDisables && d3_event && d3_event.altKey; _selection.selectAll(selector) .classed(suppressed ? 'hover-suppressed' : 'hover', true);