wasm: validate kicad hi-dpi scaling
This commit is contained in:
parent
6fa6c9207f
commit
a49ed49d5d
12 changed files with 490 additions and 30 deletions
|
|
@ -79,11 +79,10 @@
|
|||
var canvas = document.createElement('canvas');
|
||||
canvas.id = 'canvas';
|
||||
canvas.style.display = 'none';
|
||||
// Set both CSS display size and internal pixel resolution
|
||||
// wx.js owns the backing-store size via setWindowRect(); keep the HTML
|
||||
// shell responsible only for the CSS size.
|
||||
var width = window.innerWidth;
|
||||
var height = window.innerHeight;
|
||||
canvas.width = width;
|
||||
canvas.height = height;
|
||||
canvas.style.width = width + 'px';
|
||||
canvas.style.height = height + 'px';
|
||||
canvas.oncontextmenu = function() { event.preventDefault(); };
|
||||
|
|
|
|||
Loading…
Reference in a new issue