We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 010dd4e commit c01b6d9Copy full SHA for c01b6d9
src/core/View.js
@@ -323,11 +323,11 @@ export default class View extends Component {
323
onResize() {
324
const container = this.containerRef.current;
325
if (container) {
326
+ const devicePixelRatio = window.devicePixelRatio || 1;
327
const { width, height } = container.getBoundingClientRect();
- this.openglRenderWindow.setSize(
328
- Math.max(width, 10),
329
- Math.max(height, 10)
330
- );
+ const w = Math.floor(width * devicePixelRatio);
+ const h = Math.floor(height * devicePixelRatio);
+ this.openglRenderWindow.setSize(Math.max(w, 10), Math.max(h, 10));
331
this.renderWindow.render();
332
}
333
0 commit comments