mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-12 16:52:50 +00:00
Fix lint warnings
This commit is contained in:
@@ -125,7 +125,7 @@ export function coreHistory(context) {
|
||||
},
|
||||
|
||||
|
||||
merge: function(entities, extent) {
|
||||
merge: function(entities/*, extent*/) {
|
||||
var stack = _stack.map(function(state) { return state.graph; });
|
||||
_stack[0].graph.rebase(entities, stack, false);
|
||||
_tree.rebase(entities, false);
|
||||
|
||||
@@ -493,7 +493,7 @@ export function rendererBackground(context) {
|
||||
}
|
||||
});
|
||||
|
||||
if (hash.gpx) { // todo: move elsewhere - this doesn't belong in background
|
||||
if (hash.gpx) {
|
||||
const gpx = context.layers().layer('data');
|
||||
if (gpx) {
|
||||
gpx.url(hash.gpx, '.gpx');
|
||||
|
||||
@@ -447,8 +447,6 @@ export function svgLabels(projection, context) {
|
||||
|
||||
if (length < width + 20) return;
|
||||
|
||||
// todo: properly clip points to viewport
|
||||
|
||||
// % along the line to attempt to place the label
|
||||
var lineOffsets = [50, 45, 55, 40, 60, 35, 65, 30, 70,
|
||||
25, 75, 20, 80, 15, 95, 10, 90, 5, 95];
|
||||
|
||||
@@ -219,10 +219,12 @@ export function svgOsmose(projection, context, dispatch) {
|
||||
if (_layerEnabled) {
|
||||
// Strings supplied by Osmose fetched before showing layer for first time
|
||||
// NOTE: Currently no way to change locale in iD at runtime, would need to re-call this method if that's ever implemented
|
||||
// FIXME: If layer is toggled quickly multiple requests are sent
|
||||
// Also, If layer is toggled quickly multiple requests are sent
|
||||
getService().loadStrings()
|
||||
.then(layerOn)
|
||||
.catch(err => {}); // FIXME: Handle failed json request gracefully in some way
|
||||
.catch(err => {
|
||||
console.log(err); // eslint-disable-line no-console
|
||||
});
|
||||
} else {
|
||||
layerOff();
|
||||
if (context.selectedErrorID()) {
|
||||
|
||||
@@ -70,7 +70,9 @@ export function uiImproveOsmComments() {
|
||||
.append('p')
|
||||
.text(d => d.text);
|
||||
})
|
||||
.catch(err => {}); // TODO: Handle failed json request gracefully in some way
|
||||
.catch(err => {
|
||||
console.log(err); // eslint-disable-line no-console
|
||||
});
|
||||
}
|
||||
|
||||
function localeDateString(s) {
|
||||
|
||||
@@ -195,7 +195,9 @@ export function uiOsmoseDetails(context) {
|
||||
context.features().forceVisible(d.elems);
|
||||
context.map().pan([0,0]); // trigger a redraw
|
||||
})
|
||||
.catch(err => {}); // TODO: Handle failed json request gracefully in some way
|
||||
.catch(err => {
|
||||
console.log(err); // eslint-disable-line no-console
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ mocha.setup({
|
||||
|
||||
expect = chai.expect;
|
||||
|
||||
window.d3 = iD.d3; // TODO: remove if we can avoid exporting all of d3.js
|
||||
window.d3 = iD.d3; // Remove this if we can avoid exporting all of d3.js
|
||||
|
||||
// Workaround for `Array.from` polyfill in PhantomJS
|
||||
// https://github.com/openstreetmap/iD/issues/6087#issuecomment-476219308
|
||||
|
||||
Reference in New Issue
Block a user