Skip to content

Commit 374d4fb

Browse files
[fix]经纬网resize报错 review by qiw
1 parent b940910 commit 374d4fb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/mapboxgl/overlay/GraticuleLayer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export class GraticuleLayer {
114114
id: this.id
115115
});
116116
this.addGraticuleLayer();
117-
this.resizeEvent = this.renderer._resizeCallback;
117+
this.resizeEvent = this.renderer._resizeCallback.bind(this.renderer);
118118
this.zoomendEvent = this.setVisibility.bind(this);
119119
this._bindEvent()
120120
}

src/maplibregl/overlay/GraticuleLayer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export class GraticuleLayer {
118118
id: this.id
119119
});
120120
this.addGraticuleLayer();
121-
this.resizeEvent = this.renderer._resizeCallback;
121+
this.resizeEvent = this.renderer._resizeCallback.bind(this.renderer);
122122
this.zoomendEvent = this.setVisibility.bind(this);
123123
this._bindEvent()
124124
}

0 commit comments

Comments
 (0)