width and height taking into account devicePixelRatio
This commit is contained in:
parent
fc356b23d8
commit
7e10dcb05a
|
|
@ -35,8 +35,10 @@
|
|||
|
||||
function resize(canvasObj) {
|
||||
canvasObj.style = null;
|
||||
canvasObj.width = window.screen.width;
|
||||
canvasObj.height = window.screen.height;
|
||||
canvasObj.width = window.screen.width * window.devicePixelRatio;
|
||||
canvasObj.height = window.screen.height * window.devicePixelRatio;
|
||||
canvasObj.style.width = window.screen.width + "px";
|
||||
canvasObj.style.height = window.screen.widheightth + "px";
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Reference in New Issue