diff --git a/src/c3nav/editor/static/editor/css/editor.scss b/src/c3nav/editor/static/editor/css/editor.scss index 09031037..b782dc1c 100644 --- a/src/c3nav/editor/static/editor/css/editor.scss +++ b/src/c3nav/editor/static/editor/css/editor.scss @@ -601,7 +601,7 @@ label.theme-color-label { /* Snap indicator styles */ .snap-indicator { - transform: scale(13.6); + transform: scale(11.6); transform-box: fill-box; transform-origin: center; z-index: 1000; diff --git a/src/c3nav/editor/static/editor/js/editor.js b/src/c3nav/editor/static/editor/js/editor.js index 9775fa38..cd69262e 100644 --- a/src/c3nav/editor/static/editor/js/editor.js +++ b/src/c3nav/editor/static/editor/js/editor.js @@ -1753,7 +1753,7 @@ editor = { candidates.push(snapPoint); } }); - + // Find the closest candidate if (candidates.length > 0) { candidates.sort(function(a, b) { return a.distance - b.distance; }); @@ -1800,9 +1800,10 @@ editor = { // Check each edge of the geometry for (var i = 0; i < coordinates.length; i++) { + var p1 = coordinates[i]; var p2 = coordinates[(i + 1) % coordinates.length]; - + var snapPoint = editor._find_closest_point_on_edge(p1, p2, targetLatLng, targetMapPoint); if (snapPoint && snapPoint.distance < closestDistance) { closestDistance = snapPoint.distance; @@ -1871,11 +1872,10 @@ editor = { ]; var indicator = L.rectangle(bounds, { - color: '#ff6b6b', + color: '#666', weight: 2, lineCap: "square", - fillColor: '#ff6b6b', - fillOpacity: 0.8, + fillOpacity: 1., className: 'snap-indicator' });