mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-05 14:38:05 +02:00
Enable curly and block-spacing eslint rules
This commit is contained in:
@@ -49,7 +49,8 @@ var helpStringReplacements;
|
||||
// with custom `replacements`
|
||||
export function helpHtml(id, replacements) {
|
||||
// only load these the first time
|
||||
if (!helpStringReplacements) helpStringReplacements = {
|
||||
if (!helpStringReplacements) {
|
||||
helpStringReplacements = {
|
||||
// insert icons corresponding to various UI elements
|
||||
point_icon: icon('#iD-icon-point', 'inline'),
|
||||
line_icon: icon('#iD-icon-line', 'inline'),
|
||||
@@ -144,7 +145,8 @@ export function helpHtml(id, replacements) {
|
||||
start_the_walkthrough: t.html('splash.walkthrough'),
|
||||
help: t.html('help.title'),
|
||||
ok: t.html('intro.ok')
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
var reps;
|
||||
if (replacements) {
|
||||
@@ -255,10 +257,11 @@ export function selectMenuItem(context, operation) {
|
||||
|
||||
export function transitionTime(point1, point2) {
|
||||
var distance = geoSphericalDistance(point1, point2);
|
||||
if (distance === 0)
|
||||
if (distance === 0) {
|
||||
return 0;
|
||||
else if (distance < 80)
|
||||
} else if (distance < 80) {
|
||||
return 500;
|
||||
else
|
||||
} else {
|
||||
return 1000;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -211,12 +211,13 @@ export function uiIntroLine(context, reveal) {
|
||||
reveal('.surface', continueLineText);
|
||||
|
||||
context.on('enter.intro', function(mode) {
|
||||
if (mode.id === 'draw-line')
|
||||
if (mode.id === 'draw-line') {
|
||||
return;
|
||||
else if (mode.id === 'select')
|
||||
} else if (mode.id === 'select') {
|
||||
return continueTo(chooseCategoryRoad);
|
||||
else
|
||||
} else {
|
||||
return chapter.restart();
|
||||
}
|
||||
});
|
||||
|
||||
function continueTo(nextStep) {
|
||||
|
||||
Reference in New Issue
Block a user