mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Render wizard previews for high-DPI displays (#7371)
* UX: Render wizard previews for high-DPI displays Sets up a canvas element of twice the required dimensions, scales all coordinates by 2x, then shrinks the display in css. * Use window.devicePixelRatio to determine scale factor
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<div class='preview-area'>
|
||||
<canvas width={{width}} height={{height}}>
|
||||
<canvas width={{elementWidth}} height={{elementHeight}} style={{concat "width:" width "; height:" height ";"}}>
|
||||
</canvas>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user