Skip to content

Commit 630d98c

Browse files
committed
Revert "Issue an error when map canvas is larger than allowed by gl.MAX_RENDERBUFFER_SIZE #2893 (#3841)"
This reverts commit b2d40e3.
1 parent ac70fa7 commit 630d98c

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

js/ui/map.js

-7
Original file line numberDiff line numberDiff line change
@@ -1060,13 +1060,6 @@ class Map extends Camera {
10601060
return;
10611061
}
10621062

1063-
const MAX_RENDERBUFFER_SIZE = gl.getParameter(gl.MAX_RENDERBUFFER_SIZE) / 2;
1064-
if (this._canvas.width > MAX_RENDERBUFFER_SIZE ||
1065-
this._canvas.height > MAX_RENDERBUFFER_SIZE) {
1066-
throw new Error(`Map canvas (${this._canvas.width}x${this._canvas.height}) ` +
1067-
`is larger than half of gl.MAX_RENDERBUFFER_SIZE (${MAX_RENDERBUFFER_SIZE})`);
1068-
}
1069-
10701063
this.painter = new Painter(gl, this.transform);
10711064
}
10721065

test/js/ui/map.test.js

-11
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,6 @@ test('Map', (t) => {
6262
container: 'anElementIdWhichDoesNotExistInTheDocument'
6363
});
6464
}, new Error("Container 'anElementIdWhichDoesNotExistInTheDocument' not found"), 'throws on invalid map container id');
65-
66-
const largeContainer = window.document.createElement('div');
67-
largeContainer.offsetWidth = 10000;
68-
largeContainer.offsetHeight = 10000;
69-
t.throws(() => {
70-
new Map({
71-
container: largeContainer
72-
});
73-
}, /Map canvas \(\d+x\d+\) is larger than half of gl.MAX_RENDERBUFFER_SIZE \(\d+\)/,
74-
'throws on then map canvas is larger than allowed by gl.MAX_RENDERBUFFER_SIZE');
75-
7665
t.end();
7766
});
7867

0 commit comments

Comments
 (0)