Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
vcoppe committed Jan 25, 2024
1 parent 85c506f commit 07e3947
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions include/mapboxgl/leaflet-mapbox-gl.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,12 @@
L.DomUtil.setPosition(container, topLeft);

this._transformGL(gl);

var x_round = Math.round(size.x), y_round = Math.round(size.y);

if (gl.transform.width !== size.x || gl.transform.height !== size.y) {
container.style.width = size.x + 'px';
container.style.height = size.y + 'px';
if (Math.round(gl.transform.width) !== x_round || Math.round(gl.transform.height) !== y_round) {
container.style.width = x_round + 'px';
container.style.height = y_round + 'px';
if (gl._resize !== null && gl._resize !== undefined){
gl._resize();
} else {
Expand Down

0 comments on commit 07e3947

Please sign in to comment.