discourse/app/assets/javascripts/wizard/templates/components/theme-preview.hbs
David Taylor fd0de64e0d 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
2019-04-15 16:16:05 +10:00

5 lines
160 B
Handlebars

<div class='preview-area'>
<canvas width={{elementWidth}} height={{elementHeight}} style={{concat "width:" width "; height:" height ";"}}>
</canvas>
</div>