Skip to content

Commit c390406

Browse files
[fix]mapbox端经纬网line-width dash的bug修复 review by songym
1 parent 34c1a78 commit c390406

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/mapboxgl/overlay/GraticuleLayer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ export class GraticuleLayer {
120120
*/
121121
setVisibility(visible) {
122122
const zoom = this.map.getZoom();
123-
this.options.visible = typeof visible == 'boolean' ? visible : this.options.visible;
123+
this.options.visible = typeof visible === 'boolean' ? visible : this.options.visible;
124124
this.visible =
125-
typeof visible == 'boolean'
125+
typeof visible === 'boolean'
126126
? visible
127127
: this.options.visible && zoom >= this.options.minZoom && zoom <= this.options.maxZoom;
128128
if (this.map.getLayer(this.sourceId)) {
@@ -756,14 +756,14 @@ export class GraticuleLayer {
756756
};
757757

758758
if (strokeStyle.lineWidth) {
759-
if (typeof strokeStyle.lineDash === 'function') {
759+
if (typeof strokeStyle.lineWidth === 'function') {
760760
paint['line-width'] = strokeStyle.lineWidth(this.map);
761761
} else {
762762
paint['line-width'] = strokeStyle.lineWidth;
763763
}
764764
}
765765
if (strokeStyle.lindDasharray) {
766-
if (typeof strokeStyle.lineDash === 'function') {
766+
if (typeof strokeStyle.lindDasharray === 'function') {
767767
paint['line-dasharray'] = strokeStyle.lindDasharray(this.map);
768768
} else {
769769
paint['line-dasharray'] = strokeStyle.lindDasharray;

0 commit comments

Comments
 (0)