ol 10.5.1-dev.1746527002956 → 10.5.1-dev.1746612846025

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ol",
3
- "version": "10.5.1-dev.1746527002956",
3
+ "version": "10.5.1-dev.1746612846025",
4
4
  "description": "OpenLayers mapping library",
5
5
  "keywords": [
6
6
  "map",
@@ -648,9 +648,9 @@ function parseStrokeProperties(style, builder, uniforms, context) {
648
648
  const uniqueDashKey = computeHash(style['stroke-line-dash']);
649
649
  const dashFunctionName = `dashDistanceField_${uniqueDashKey}`;
650
650
 
651
- const dashLengthsDef = dashPattern.map(
652
- (v, i) => `float dashLength${i} = ${v};`,
653
- );
651
+ const dashLengthsParamsDef = dashPattern
652
+ .map((v, i) => `float dashLength${i}`)
653
+ .join(', ');
654
654
  const totalLengthDef = dashPattern
655
655
  .map((v, i) => `dashLength${i}`)
656
656
  .join(' + ');
@@ -664,13 +664,13 @@ function parseStrokeProperties(style, builder, uniforms, context) {
664
664
  }
665
665
 
666
666
  context.functions[dashFunctionName] =
667
- `float ${dashFunctionName}(float distance, float radius, float capType, float lineWidth) {
668
- ${dashLengthsDef.join('\n ')}
667
+ `float ${dashFunctionName}(float distance, float radius, float capType, float lineWidth, ${dashLengthsParamsDef}) {
669
668
  float totalDashLength = ${totalLengthDef};
670
669
  return ${distanceExpression};
671
670
  }`;
671
+ const dashLengthsCalls = dashPattern.map((v, i) => `${v}`).join(', ');
672
672
  builder.setStrokeDistanceFieldExpression(
673
- `${dashFunctionName}(currentLengthPx + ${offsetExpression}, currentRadiusPx, capType, v_width)`,
673
+ `${dashFunctionName}(currentLengthPx + ${offsetExpression}, currentRadiusPx, capType, v_width, ${dashLengthsCalls})`,
674
674
  );
675
675
  }
676
676
  }
package/util.js CHANGED
@@ -33,4 +33,4 @@ export function getUid(obj) {
33
33
  * OpenLayers version.
34
34
  * @type {string}
35
35
  */
36
- export const VERSION = '10.5.1-dev.1746527002956';
36
+ export const VERSION = '10.5.1-dev.1746612846025';