my-openlayer 0.1.17 → 0.1.18
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/core/Polygon.js +2 -1
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/core/Polygon.js
CHANGED
|
@@ -58,6 +58,7 @@ export default class Polygon {
|
|
|
58
58
|
features?.forEach(feature => {
|
|
59
59
|
feature.set('type', options?.type);
|
|
60
60
|
feature.set('layerName', options?.type);
|
|
61
|
+
const fillColor = options?.fillColorCallBack ? options.fillColorCallBack(feature) : options?.fillColor;
|
|
61
62
|
const featureStyle = new Style({
|
|
62
63
|
stroke: new Stroke({
|
|
63
64
|
color: options?.strokeColor ?? '#EBEEF5',
|
|
@@ -65,7 +66,7 @@ export default class Polygon {
|
|
|
65
66
|
lineDash: options?.lineDash,
|
|
66
67
|
lineDashOffset: options?.lineDashOffset
|
|
67
68
|
}),
|
|
68
|
-
fill: new Fill({ color:
|
|
69
|
+
fill: new Fill({ color: fillColor ?? 'rgba(255, 255, 255, 0.3)' }),
|
|
69
70
|
});
|
|
70
71
|
if (options?.textVisible) {
|
|
71
72
|
const text = (options?.textCallBack ? options?.textCallBack(feature) : '') || (options.nameKey ? feature.get(options.nameKey) : "");
|
package/dist/types.d.ts
CHANGED