From 5fedd4e4a6fe817a74eacafda4f91ccca74c541a Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 16 Jan 2024 11:11:45 +0100 Subject: [PATCH] Add missing trailing commas --- cases/common.js | 8 ++++---- cases/filtering-shapes/main.js | 8 ++++---- cases/line-rendering/main.js | 16 ++++++++-------- cases/point-rendering/main.js | 10 +++++----- cases/polygon-rendering/main.js | 14 +++++++------- cases/vector-tiles-rendering/main.js | 8 ++++---- 6 files changed, 32 insertions(+), 32 deletions(-) diff --git a/cases/common.js b/cases/common.js index 928b37d..fcceb85 100644 --- a/cases/common.js +++ b/cases/common.js @@ -286,7 +286,7 @@ export function registerGuiParameter( label, values, defaultValue, - callback + callback, ) { let controller; const isNumeric = typeof values[0] === 'number'; @@ -309,7 +309,7 @@ export function registerGuiParameter( id, numericValues[0], numericValues[1], - numericValues[2] || 1 + numericValues[2] || 1, ); } else { guiParams[id] = initialValue; @@ -388,7 +388,7 @@ export function initializeGui() { return; } regenerateLayer(); - } + }, ); registerGuiParameter( @@ -402,6 +402,6 @@ export function initializeGui() { } else if (!initial) { location.reload(); } - } + }, ); } diff --git a/cases/filtering-shapes/main.js b/cases/filtering-shapes/main.js index 85000e9..ae4b521 100644 --- a/cases/filtering-shapes/main.js +++ b/cases/filtering-shapes/main.js @@ -48,9 +48,9 @@ function main() { style, }, ], - }) + }), ); - } + }, ); initializeGui(); registerGuiParameter( @@ -60,7 +60,7 @@ function main() { 200000, (value, initial) => { resetData(/** @type {number} */ (value)); - } + }, ); registerGuiParameter( 'filterValue', @@ -73,7 +73,7 @@ function main() { } style.filter = ['>', ['get', 'ratio'], value]; regenerateLayer(); - } + }, ); style.filter = ['>', ['get', 'ratio'], getGuiParameterValue('filterValue')]; } diff --git a/cases/line-rendering/main.js b/cases/line-rendering/main.js index b569e4d..79be1ba 100644 --- a/cases/line-rendering/main.js +++ b/cases/line-rendering/main.js @@ -42,7 +42,7 @@ function main() { }, (map) => { map.addLayer(new VectorLayer({source, style})); - } + }, ); initializeGui(); registerGuiParameter( @@ -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) { @@ -68,7 +68,7 @@ function main() { resetData( /** @type {number} */ (getGuiParameterValue('count')), /** @type {number} */ (getGuiParameterValue('curveComplexity')), - /** @type {number} */ (value) + /** @type {number} */ (value), ); }); registerGuiParameter( @@ -83,9 +83,9 @@ function main() { resetData( /** @type {number} */ (getGuiParameterValue('count')), /** @type {number} */ (value), - /** @type {number} */ (getGuiParameterValue('width')) + /** @type {number} */ (getGuiParameterValue('width')), ); - } + }, ); registerGuiParameter( 'dash', @@ -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(); diff --git a/cases/point-rendering/main.js b/cases/point-rendering/main.js index 918f595..be084d0 100644 --- a/cases/point-rendering/main.js +++ b/cases/point-rendering/main.js @@ -42,7 +42,7 @@ function main() { }, (map) => { map.addLayer(new VectorLayer({source, style})); - } + }, ); initializeGui(); registerGuiParameter( @@ -56,9 +56,9 @@ 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) { @@ -66,13 +66,13 @@ function main() { } 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(); diff --git a/cases/polygon-rendering/main.js b/cases/polygon-rendering/main.js index d7cff75..61d91b3 100644 --- a/cases/polygon-rendering/main.js +++ b/cases/polygon-rendering/main.js @@ -37,7 +37,7 @@ function main() { }, (map) => { map.addLayer(new VectorLayer({source, style})); - } + }, ); initializeGui(); registerGuiParameter( @@ -51,9 +51,9 @@ function main() { } resetData( /** @type {number} */ (value), - /** @type {number} */ (getGuiParameterValue('vertices')) + /** @type {number} */ (getGuiParameterValue('vertices')), ); - } + }, ); registerGuiParameter( 'vertices', @@ -66,9 +66,9 @@ function main() { } resetData( /** @type {number} */ (getGuiParameterValue('count')), - /** @type {number} */ (value) + /** @type {number} */ (value), ); - } + }, ); registerGuiParameter( 'outline', @@ -84,12 +84,12 @@ function main() { delete style['stroke-color']; } regenerateLayer(); - } + }, ); resetData( /** @type {number} */ (getGuiParameterValue('count')), - /** @type {number} */ (getGuiParameterValue('vertices')) + /** @type {number} */ (getGuiParameterValue('vertices')), ); } diff --git a/cases/vector-tiles-rendering/main.js b/cases/vector-tiles-rendering/main.js index 21bbc3e..a639878 100644 --- a/cases/vector-tiles-rendering/main.js +++ b/cases/vector-tiles-rendering/main.js @@ -187,7 +187,7 @@ function tileLoadFunction(tile) { countPolygons, countLines, numVertices, - extent + extent, ); const features = format.readFeatures(data); tile.setFeatures(features); @@ -204,9 +204,9 @@ function main() { source, // @ts-ignore style: style, - }) + }), ); - } + }, ); initializeGui(); registerGuiParameter( @@ -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()); - } + }, ); }