Skip to content

Commit

Permalink
Merge pull request #211 from sheeley820/fix-undefined-listener-error
Browse files Browse the repository at this point in the history
Reference GL Map resize function in place of undefined reference
  • Loading branch information
gavinr-maps authored Dec 1, 2023
2 parents 4fae9f2 + d0c1049 commit 2e47516
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/MaplibreGLLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export var MaplibreGLJSLayer = Layer.extend({
getEvents: function () {
return {
move: this._throttledUpdate, // sensibly throttle updating while panning
zoomanim: this._animateZoom, // applys the zoom animation to the <canvas>
zoomanim: this._animateZoom, // applies the zoom animation to the <canvas>
zoom: this._pinchZoom, // animate every zoom event for smoother pinch-zooming
zoomstart: this._zoomStart, // flag starting a zoom to disable panning
zoomend: this._zoomEnd,
Expand Down Expand Up @@ -131,6 +131,10 @@ export var MaplibreGLJSLayer = Layer.extend({
: 'tilePane';
},

_resize: function () {
return this._glMap._resize;
},

_initContainer: function () {
if (this._container) {
return;
Expand Down Expand Up @@ -198,7 +202,7 @@ export var MaplibreGLJSLayer = Layer.extend({
},

_update: function (e) {
// update the offset so we can correct for it later when we zoom
// update the offset, so we can correct for it later when we zoom
this._offset = this._map.containerPointToLayerPoint([0, 0]);

if (this._zooming) {
Expand Down

0 comments on commit 2e47516

Please sign in to comment.