File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -285,7 +285,7 @@ const guiParams = {};
285285 * The `id` and `values` will show up in the url
286286 * @param {string } id Id
287287 * @param {string } label Label
288- * @param {Array<string>|Array<number> } values Either two string values for true/false, or two numbers defining a range
288+ * @param {Array<string>|Array<number> } values Either two string values for true/false, or two numbers defining a range + optional step value
289289 * @param {boolean|number|function(): void } defaultValue Default value
290290 * @param {function(boolean|number|function(): void, boolean|null): void } callback Called when the parameter changes, and also on initialization
291291 * First argument is the current value, second argument is true if this is the initial call
@@ -454,6 +454,7 @@ function animate() {
454454 } , 1000 ) ;
455455}
456456
457+ /** @type {string } */
457458export const olVersion =
458459 new URL ( window . location . href ) . searchParams . get ( 'olVersion' ) ??
459460 // @ts -ignore
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ function generateStyle() {
3434 defaultStylesCount ;
3535
3636 // use a single style rule for OpenLayers versions < 10.4.1
37- if ( compareVersions ( olVersion , '10.4.1' ) < 0 ) {
37+ if ( olVersion . match ( / ^ [ 0 - 9 ] / ) && compareVersions ( olVersion , '10.4.1' ) < 0 ) {
3838 const colorExpr = [
3939 'match' ,
4040 [ 'get' , 'propValue' ] ,
You can’t perform that action at this time.
0 commit comments