pacify some eslint warnings

This commit is contained in:
Bryan Housel
2018-07-07 23:00:28 -04:00
parent 3eb3eefabd
commit 7b42743513
2 changed files with 6 additions and 9 deletions

View File

@@ -1,15 +1,13 @@
import _throttle from 'lodash-es/throttle';
import { select as d3_select } from 'd3-selection';
import { svgPointTransform } from './index';
import { services } from '../services';
import { osmNote } from '../osm';
import { uiNoteEditor } from '../ui';
export function svgNotes(projection, context, dispatch) {
var throttledRedraw = _throttle(function () { dispatch.call('change'); }, 1000);
// var noteEditor = uiNoteEditor(context);
var minZoom = 12;
var layer = d3_select(null);
var _notes;
@@ -31,6 +29,7 @@ export function svgNotes(projection, context, dispatch) {
layer.style('display', 'none');
}
function getService() {
if (services.osm && !_notes) {
_notes = services.osm;
@@ -42,6 +41,7 @@ export function svgNotes(projection, context, dispatch) {
return _notes;
}
function showLayer() {
editOn();
@@ -53,6 +53,7 @@ export function svgNotes(projection, context, dispatch) {
.on('end', function () { dispatch.call('change'); });
}
function hideLayer() {
throttledRedraw.cancel();
@@ -70,6 +71,7 @@ export function svgNotes(projection, context, dispatch) {
}
}
function update() {
var service = getService();
var selectedID = context.selectedNoteID();

View File

@@ -10,12 +10,10 @@ import { t } from '../util/locale';
import { svgIcon } from '../svg';
import { services } from '../services';
import {
utilGetSetValue,
utilNoAuto,
utilRebind
} from '../util';
import { uiField } from './field';
import { utilDetect } from '../util/detect';
var _newComment;
@@ -23,9 +21,7 @@ var _newComment;
export function uiNoteEditor(context) {
var dispatch = d3_dispatch('change', 'cancel', 'save', 'changeInput');
var formFields = uiFormFields(context);
var commentLimit = 600; // add a "more" link to comments longer than this length
var _fieldsArr;
var _modified = false;
var _note;
@@ -337,7 +333,6 @@ export function uiNoteEditor(context) {
noteEditor.note = function(_) {
if (!arguments.length) return _note;
_note = _;
_fieldsArr = null;
return noteEditor;
};