ol 10.5.1-dev.1746527002956 → 10.5.1-dev.1746704802395
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/dist/ol.js +1 -1
- package/dist/ol.js.map +1 -1
- package/package.json +1 -1
- package/render/webgl/style.js +6 -6
- package/util.js +1 -1
package/package.json
CHANGED
package/render/webgl/style.js
CHANGED
|
@@ -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
|
|
652
|
-
(v, i) => `float dashLength${i}
|
|
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