Skip to content

Commit

Permalink
comments...
Browse files Browse the repository at this point in the history
ref #1425
  • Loading branch information
maxgrossman committed May 13, 2019
1 parent 8d9ab10 commit fac2925
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/behavior/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand Down
1 change: 1 addition & 0 deletions modules/behavior/draw_way.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions modules/behavior/hover.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fac2925

Please sign in to comment.