From 4f7014b1a9724cf46548aa0e3a5feae6f4c6853d Mon Sep 17 00:00:00 2001 From: Quincy Morgan <2046746+quincylvania@users.noreply.github.com> Date: Tue, 27 Oct 2020 21:08:38 -0400 Subject: [PATCH] Fix lint warnings and error --- modules/ui/init.js | 2 +- modules/ui/sections/background_offset.js | 6 ------ modules/ui/sidebar.js | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/modules/ui/init.js b/modules/ui/init.js index 2242d98a8..f8fbac03a 100644 --- a/modules/ui/init.js +++ b/modules/ui/init.js @@ -166,7 +166,7 @@ export function uiInit(context) { // HACK: Mobile Safari 14 likes to select anything selectable when long- // pressing, even if it's not targeted. This conflicts with long-pressing // to show the edit menu. We add a selectable offscreen element as the first - // child to trick Safari into not showing the selection UI. + // child to trick Safari into not showing the selection UI. overMap .append('div') .attr('class', 'select-trap') diff --git a/modules/ui/sections/background_offset.js b/modules/ui/sections/background_offset.js index 9d34a8f08..ca7c7479c 100644 --- a/modules/ui/sections/background_offset.js +++ b/modules/ui/sections/background_offset.js @@ -25,12 +25,6 @@ export function uiSectionBackgroundOffset(context) { ]; - function cancelEvent(d3_event) { - d3_event.stopPropagation(); - d3_event.preventDefault(); - } - - function updateValue() { var meters = geoOffsetToMeters(context.background().offset()); var x = +meters[0].toFixed(2); diff --git a/modules/ui/sidebar.js b/modules/ui/sidebar.js index f60c7d29e..8595bc9ca 100644 --- a/modules/ui/sidebar.js +++ b/modules/ui/sidebar.js @@ -407,7 +407,7 @@ export function uiSidebar(context) { resizer.on('dblclick', function(d3_event) { d3_event.preventDefault(); if (d3_event.sourceEvent) { - e.sourceEvent.preventDefault(); + d3_event.sourceEvent.preventDefault(); } sidebar.toggle(); });