Skip to content

Commit

Permalink
Add missing trailing commas
Browse files Browse the repository at this point in the history
  • Loading branch information
fredj committed Jan 16, 2024
1 parent 60c4ea9 commit 5fedd4e
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 32 deletions.
8 changes: 4 additions & 4 deletions cases/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ export function registerGuiParameter(
label,
values,
defaultValue,
callback
callback,
) {
let controller;
const isNumeric = typeof values[0] === 'number';
Expand All @@ -309,7 +309,7 @@ export function registerGuiParameter(
id,
numericValues[0],
numericValues[1],
numericValues[2] || 1
numericValues[2] || 1,
);
} else {
guiParams[id] = initialValue;
Expand Down Expand Up @@ -388,7 +388,7 @@ export function initializeGui() {
return;
}
regenerateLayer();
}
},
);

registerGuiParameter(
Expand All @@ -402,6 +402,6 @@ export function initializeGui() {
} else if (!initial) {
location.reload();
}
}
},
);
}
8 changes: 4 additions & 4 deletions cases/filtering-shapes/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ function main() {
style,
},
],
})
}),
);
}
},
);
initializeGui();
registerGuiParameter(
Expand All @@ -60,7 +60,7 @@ function main() {
200000,
(value, initial) => {
resetData(/** @type {number} */ (value));
}
},
);
registerGuiParameter(
'filterValue',
Expand All @@ -73,7 +73,7 @@ function main() {
}
style.filter = ['>', ['get', 'ratio'], value];
regenerateLayer();
}
},
);
style.filter = ['>', ['get', 'ratio'], getGuiParameterValue('filterValue')];
}
Expand Down
16 changes: 8 additions & 8 deletions cases/line-rendering/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function main() {
},
(map) => {
map.addLayer(new VectorLayer({source, style}));
}
},
);
initializeGui();
registerGuiParameter(
Expand All @@ -57,9 +57,9 @@ function main() {
resetData(
/** @type {number} */ (value),
/** @type {number} */ (getGuiParameterValue('curveComplexity')),
/** @type {number} */ (getGuiParameterValue('width'))
/** @type {number} */ (getGuiParameterValue('width')),
);
}
},
);
registerGuiParameter('width', 'Width', [1, 20, 1], 2, (value, initial) => {
if (initial) {
Expand All @@ -68,7 +68,7 @@ function main() {
resetData(
/** @type {number} */ (getGuiParameterValue('count')),
/** @type {number} */ (getGuiParameterValue('curveComplexity')),
/** @type {number} */ (value)
/** @type {number} */ (value),
);
});
registerGuiParameter(
Expand All @@ -83,9 +83,9 @@ function main() {
resetData(
/** @type {number} */ (getGuiParameterValue('count')),
/** @type {number} */ (value),
/** @type {number} */ (getGuiParameterValue('width'))
/** @type {number} */ (getGuiParameterValue('width')),
);
}
},
);
registerGuiParameter(
'dash',
Expand All @@ -99,13 +99,13 @@ function main() {
delete style['stroke-line-dash'];
}
regenerateLayer();
}
},
);

resetData(
/** @type {number} */ (getGuiParameterValue('count')),
/** @type {number} */ (getGuiParameterValue('curveComplexity')),
/** @type {number} */ (getGuiParameterValue('width'))
/** @type {number} */ (getGuiParameterValue('width')),
);
}
main();
10 changes: 5 additions & 5 deletions cases/point-rendering/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function main() {
},
(map) => {
map.addLayer(new VectorLayer({source, style}));
}
},
);
initializeGui();
registerGuiParameter(
Expand All @@ -56,23 +56,23 @@ function main() {
}
resetData(
/** @type {number} */ (value),
/** @type {number} */ (getGuiParameterValue('radius'))
/** @type {number} */ (getGuiParameterValue('radius')),
);
}
},
);
registerGuiParameter('radius', 'Radius', [4, 40, 1], 4, (value, initial) => {
if (initial) {
return;
}
resetData(
/** @type {number} */ (getGuiParameterValue('count')),
/** @type {number} */ (value)
/** @type {number} */ (value),
);
});

resetData(
/** @type {number} */ (getGuiParameterValue('count')),
/** @type {number} */ (getGuiParameterValue('radius'))
/** @type {number} */ (getGuiParameterValue('radius')),
);
}
main();
14 changes: 7 additions & 7 deletions cases/polygon-rendering/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function main() {
},
(map) => {
map.addLayer(new VectorLayer({source, style}));
}
},
);
initializeGui();
registerGuiParameter(
Expand All @@ -51,9 +51,9 @@ function main() {
}
resetData(
/** @type {number} */ (value),
/** @type {number} */ (getGuiParameterValue('vertices'))
/** @type {number} */ (getGuiParameterValue('vertices')),
);
}
},
);
registerGuiParameter(
'vertices',
Expand All @@ -66,9 +66,9 @@ function main() {
}
resetData(
/** @type {number} */ (getGuiParameterValue('count')),
/** @type {number} */ (value)
/** @type {number} */ (value),
);
}
},
);
registerGuiParameter(
'outline',
Expand All @@ -84,12 +84,12 @@ function main() {
delete style['stroke-color'];
}
regenerateLayer();
}
},
);

resetData(
/** @type {number} */ (getGuiParameterValue('count')),
/** @type {number} */ (getGuiParameterValue('vertices'))
/** @type {number} */ (getGuiParameterValue('vertices')),
);
}

Expand Down
8 changes: 4 additions & 4 deletions cases/vector-tiles-rendering/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function tileLoadFunction(tile) {
countPolygons,
countLines,
numVertices,
extent
extent,
);
const features = format.readFeatures(data);
tile.setFeatures(features);
Expand All @@ -204,9 +204,9 @@ function main() {
source,
// @ts-ignore
style: style,
})
}),
);
}
},
);
initializeGui();
registerGuiParameter(
Expand All @@ -222,7 +222,7 @@ function main() {
// workaround required for webgl renderer; see https://github.com/openlayers/openlayers/issues/15213
// @ts-ignore
source.setKey(Date.now().toString());
}
},
);
}

Expand Down

0 comments on commit 5fedd4e

Please sign in to comment.