mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-28 10:51:45 +02:00
Pacify eslint, get build and tests running again
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import * as d3 from 'd3';
|
||||
import _ from 'lodash';
|
||||
import { rebind } from '../../util/rebind';
|
||||
import { getSetValue } from '../../util/get_set_value';
|
||||
import { d3combobox } from '../../../js/lib/d3.combobox.js';
|
||||
import * as d3 from 'd3';
|
||||
import _ from 'lodash';
|
||||
|
||||
export function access(field) {
|
||||
var dispatch = d3.dispatch('change'),
|
||||
@@ -51,7 +51,7 @@ export function access(field) {
|
||||
function change(d) {
|
||||
var tag = {};
|
||||
tag[d] = getSetValue(d3.select(this)) || undefined;
|
||||
dispatch.call("change", this, tag);
|
||||
dispatch.call('change', this, tag);
|
||||
}
|
||||
|
||||
access.options = function(type) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import * as d3 from 'd3';
|
||||
import _ from 'lodash';
|
||||
import { rebind } from '../../util/rebind';
|
||||
import { getSetValue } from '../../util/get_set_value';
|
||||
import { d3combobox } from '../../../js/lib/d3.combobox.js';
|
||||
import * as d3 from 'd3';
|
||||
import _ from 'lodash';
|
||||
import { Extent, chooseEdge, sphericalDistance } from '../../geo/index';
|
||||
import { nominatim } from '../../services/index';
|
||||
import { addressFormats } from '../../../data/index';
|
||||
@@ -178,7 +178,7 @@ export function address(field, context) {
|
||||
wrap.selectAll('input:not(.combobox-input)')
|
||||
.on('input', change(true));
|
||||
|
||||
dispatch.call("init");
|
||||
dispatch.call('init');
|
||||
isInitialized = true;
|
||||
});
|
||||
}
|
||||
@@ -192,7 +192,7 @@ export function address(field, context) {
|
||||
tags['addr:' + field.id] = this.value || undefined;
|
||||
});
|
||||
|
||||
dispatch.call("change", this, tags, onInput);
|
||||
dispatch.call('change', this, tags, onInput);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ export function address(field, context) {
|
||||
if (isInitialized) {
|
||||
updateTags(tags);
|
||||
} else {
|
||||
dispatch.call("on", this, 'init', function () {
|
||||
dispatch.call('on', this, 'init', function () {
|
||||
updateTags(tags);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { rebind } from '../../util/rebind';
|
||||
import * as d3 from 'd3';
|
||||
import { rebind } from '../../util/rebind';
|
||||
import { t } from '../../util/locale';
|
||||
import { oneWayTags } from '../../core/index';
|
||||
|
||||
export { check as defaultcheck };
|
||||
|
||||
export function check(field) {
|
||||
var dispatch = d3.dispatch('change'),
|
||||
options = field.strings && field.strings.options,
|
||||
@@ -58,7 +59,7 @@ export function check(field) {
|
||||
.on('click', function() {
|
||||
var t = {};
|
||||
t[field.key] = values[(values.indexOf(value) + 1) % values.length];
|
||||
dispatch.call("change", this, t);
|
||||
dispatch.call('change', this, t);
|
||||
d3.event.stopPropagation();
|
||||
});
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import * as d3 from 'd3';
|
||||
import _ from 'lodash';
|
||||
import { t } from '../../util/locale';
|
||||
import { rebind } from '../../util/rebind';
|
||||
import { getSetValue } from '../../util/get_set_value';
|
||||
import { d3combobox } from '../../../js/lib/d3.combobox.js';
|
||||
import * as d3 from 'd3';
|
||||
import _ from 'lodash';
|
||||
|
||||
import { t } from '../../util/locale';
|
||||
import { nominatim } from '../../services/index';
|
||||
|
||||
export {
|
||||
@@ -208,7 +207,7 @@ export function combo(field, context) {
|
||||
t[field.key] = val;
|
||||
}
|
||||
|
||||
dispatch.call("change", this, t);
|
||||
dispatch.call('change', this, t);
|
||||
}
|
||||
|
||||
|
||||
@@ -216,7 +215,7 @@ export function combo(field, context) {
|
||||
d3.event.stopPropagation();
|
||||
var t = {};
|
||||
t[d.key] = undefined;
|
||||
dispatch.call("change", this, t);
|
||||
dispatch.call('change', this, t);
|
||||
}
|
||||
|
||||
|
||||
@@ -291,7 +290,7 @@ export function combo(field, context) {
|
||||
var available = objectDifference(comboData, multiData);
|
||||
combobox.data(available);
|
||||
|
||||
// Hide "Add" button if this field uses fixed set of
|
||||
// Hide 'Add' button if this field uses fixed set of
|
||||
// translateable optstrings and they're all currently used..
|
||||
container.selectAll('.combobox-input, .combobox-caret')
|
||||
.classed('hide', optstrings && !available.length);
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import * as d3 from 'd3';
|
||||
import { rebind } from '../../util/rebind';
|
||||
import { getSetValue } from '../../util/get_set_value';
|
||||
import { d3combobox } from '../../../js/lib/d3.combobox.js';
|
||||
import * as d3 from 'd3';
|
||||
|
||||
export function cycleway(field) {
|
||||
var dispatch = d3.dispatch('change'),
|
||||
items;
|
||||
@@ -18,7 +19,6 @@ export function cycleway(field) {
|
||||
.data(field.keys);
|
||||
|
||||
// Enter
|
||||
|
||||
var enter = items.enter().append('li')
|
||||
.attr('class', function(d) { return 'cf preset-cycleway-' + d; });
|
||||
|
||||
@@ -40,7 +40,6 @@ export function cycleway(field) {
|
||||
});
|
||||
|
||||
// Update
|
||||
|
||||
wrap.selectAll('.preset-input-cycleway')
|
||||
.on('change', change)
|
||||
.on('blur', change);
|
||||
@@ -51,6 +50,7 @@ export function cycleway(field) {
|
||||
left = getSetValue(d3.select(inputs[0])),
|
||||
right = getSetValue(d3.select(inputs[1])),
|
||||
tag = {};
|
||||
|
||||
if (left === 'none' || left === '') { left = undefined; }
|
||||
if (right === 'none' || right === '') { right = undefined; }
|
||||
|
||||
@@ -71,7 +71,7 @@ export function cycleway(field) {
|
||||
};
|
||||
}
|
||||
|
||||
dispatch.call("change", this, tag);
|
||||
dispatch.call('change', this, tag);
|
||||
}
|
||||
|
||||
cycleway.options = function() {
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
import * as d3 from 'd3';
|
||||
import { rebind } from '../../util/rebind';
|
||||
import { getSetValue } from '../../util/get_set_value';
|
||||
import * as d3 from 'd3';
|
||||
import { t } from '../../util/locale';
|
||||
import { nominatim as nominatimService } from '../../services/index';
|
||||
import { phoneFormats } from '../../../data/index';
|
||||
|
||||
export {
|
||||
url as text,
|
||||
url as number,
|
||||
url as tel,
|
||||
url as email
|
||||
url as text,
|
||||
url as number,
|
||||
url as tel,
|
||||
url as email
|
||||
};
|
||||
|
||||
export function url(field, context) {
|
||||
|
||||
var dispatch = d3.dispatch('change'),
|
||||
@@ -75,7 +76,7 @@ export function url(field, context) {
|
||||
return function() {
|
||||
var t = {};
|
||||
t[field.key] = getSetValue(input) || undefined;
|
||||
dispatch.call("change", this, t, onInput);
|
||||
dispatch.call('change', this, t, onInput);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { rebind } from '../../util/rebind';
|
||||
import * as d3 from 'd3';
|
||||
import { rebind } from '../../util/rebind';
|
||||
import { getDimensions } from '../../util/dimensions';
|
||||
|
||||
export function lanes(field, context) {
|
||||
var dispatch = d3.dispatch('change'),
|
||||
LANE_WIDTH = 40,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import * as d3 from 'd3';
|
||||
import _ from 'lodash';
|
||||
import { rebind } from '../../util/rebind';
|
||||
import { d3combobox } from '../../../js/lib/d3.combobox.js';
|
||||
import { getSetValue } from '../../util/get_set_value';
|
||||
import * as d3 from 'd3';
|
||||
import { t } from '../../util/locale';
|
||||
import { tooltip } from '../../util/tooltip';
|
||||
import _ from 'lodash';
|
||||
import { Detect } from '../../util/detect';
|
||||
import { Icon } from '../../svg/index';
|
||||
import { SuggestNames } from '../../util/index';
|
||||
@@ -78,7 +78,7 @@ export function localized(field, context) {
|
||||
return function() {
|
||||
var t = {};
|
||||
t[field.key] = getSetValue(d3.select(this)) || undefined;
|
||||
dispatch.call("change", this, t, onInput);
|
||||
dispatch.call('change', this, t, onInput);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -108,14 +108,14 @@ export function localized(field, context) {
|
||||
}
|
||||
|
||||
d.lang = lang;
|
||||
dispatch.call("change", this, t);
|
||||
dispatch.call('change', this, t);
|
||||
}
|
||||
|
||||
function changeValue(d) {
|
||||
if (!d.lang) return;
|
||||
var t = {};
|
||||
t[key(d.lang)] = getSetValue(d3.select(this)) || undefined;
|
||||
dispatch.call("change", this, t);
|
||||
dispatch.call('change', this, t);
|
||||
}
|
||||
|
||||
function fetcher(value, cb) {
|
||||
@@ -153,7 +153,7 @@ export function localized(field, context) {
|
||||
d3.event.preventDefault();
|
||||
var t = {};
|
||||
t[key(d.lang)] = undefined;
|
||||
dispatch.call("change", this, t);
|
||||
dispatch.call('change', this, t);
|
||||
d3.select(this.parentNode.parentNode)
|
||||
.style('top','0')
|
||||
.style('max-height','240px')
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import * as d3 from 'd3';
|
||||
import _ from 'lodash';
|
||||
import { rebind } from '../../util/rebind';
|
||||
import { getSetValue } from '../../util/get_set_value';
|
||||
import { d3combobox } from '../../../js/lib/d3.combobox.js';
|
||||
import * as d3 from 'd3';
|
||||
import _ from 'lodash';
|
||||
import { pointInPolygon } from '../../geo/index';
|
||||
import { imperial as imperialData } from '../../../data/index';
|
||||
|
||||
@@ -88,7 +88,7 @@ export function maxspeed(field, context) {
|
||||
tag[field.key] = value + ' mph';
|
||||
}
|
||||
|
||||
dispatch.call("change", this, tag);
|
||||
dispatch.call('change', this, tag);
|
||||
}
|
||||
|
||||
maxspeed.tags = function(tags) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { rebind } from '../../util/rebind';
|
||||
import * as d3 from 'd3';
|
||||
import { rebind } from '../../util/rebind';
|
||||
import { t } from '../../util/locale';
|
||||
|
||||
export function radio(field) {
|
||||
@@ -49,7 +49,7 @@ export function radio(field) {
|
||||
t[d] = active ? 'yes' : undefined;
|
||||
}
|
||||
});
|
||||
dispatch.call("change", this, t);
|
||||
dispatch.call('change', this, t);
|
||||
}
|
||||
|
||||
radio.tags = function(tags) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import * as d3 from 'd3';
|
||||
import { t } from '../../util/locale';
|
||||
import { rebind } from '../../util/rebind';
|
||||
import { functor } from '../../util/index';
|
||||
import { getDimensions, setDimensions } from '../../util/dimensions';
|
||||
import * as d3 from 'd3';
|
||||
import { t } from '../../util/locale';
|
||||
import { Extent, Intersection, RawMercator, Turn, inferRestriction } from '../../geo/index';
|
||||
import { Layers, Lines, Turns, Vertices } from '../../svg/index';
|
||||
import { RestrictTurn, UnrestrictTurn, } from '../../actions/index';
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { rebind } from '../../util/rebind';
|
||||
import * as d3 from 'd3';
|
||||
import { getSetValue } from '../../util/get_set_value';
|
||||
import { rebind } from '../../util/rebind';
|
||||
import { t } from '../../util/locale';
|
||||
|
||||
export function textarea(field) {
|
||||
@@ -25,7 +26,7 @@ export function textarea(field) {
|
||||
return function() {
|
||||
var t = {};
|
||||
t[field.key] = getSetValue(input) || undefined;
|
||||
dispatch.call("change", this, t, onInput);
|
||||
dispatch.call('change', this, t, onInput);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
import { rebind } from '../../util/rebind';
|
||||
import { d3combobox } from '../../../js/lib/d3.combobox.js';
|
||||
import * as d3 from 'd3';
|
||||
import { t } from '../../util/locale';
|
||||
import _ from 'lodash';
|
||||
import { d3combobox } from '../../../js/lib/d3.combobox.js';
|
||||
import { getSetValue } from '../../util/get_set_value';
|
||||
import { rebind } from '../../util/rebind';
|
||||
import { t } from '../../util/locale';
|
||||
import { ChangeTags } from '../../actions/index';
|
||||
import { Detect } from '../../util/detect';
|
||||
import { Icon } from '../../svg/index';
|
||||
import { wikipedia as wikipediaData } from '../../../data/index';
|
||||
|
||||
import {
|
||||
wikipedia as wikipediaService,
|
||||
wikidata as wikidataService
|
||||
@@ -132,7 +134,7 @@ export function wikipedia(field, context) {
|
||||
syncTags.wikidata = undefined;
|
||||
}
|
||||
|
||||
dispatch.call("change", this, syncTags);
|
||||
dispatch.call('change', this, syncTags);
|
||||
|
||||
|
||||
if (skipWikidata || !value || !language()[2]) return;
|
||||
@@ -163,7 +165,7 @@ export function wikipedia(field, context) {
|
||||
});
|
||||
|
||||
context.overwrite(ChangeTags(currEntityId, currTags), annotation);
|
||||
dispatch.call("change", this, currTags);
|
||||
dispatch.call('change', this, currTags);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user