From: Misty De Meo Date: Sun, 29 Jan 2017 13:26:50 +0000 (-0800) Subject: Fix avatar scaling on high-DPI displays (#573) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=a30e669df24e680fa94fc954144d2fa9b04fcf4f;p=mastodon.git Fix avatar scaling on high-DPI displays (#573) --- diff --git a/app/assets/javascripts/components/components/avatar.jsx b/app/assets/javascripts/components/components/avatar.jsx index b8420014b..8d5c90b33 100644 --- a/app/assets/javascripts/components/components/avatar.jsx +++ b/app/assets/javascripts/components/components/avatar.jsx @@ -25,7 +25,7 @@ const Avatar = React.createClass({ }, handleLoad () { - this.canvas.getContext('2d').drawImage(this.image, 0, 0, this.props.size, this.props.size); + this.canvas.getContext('2d').drawImage(this.image, 0, 0, this.props.size * window.devicePixelRatio, this.props.size * window.devicePixelRatio); }, setImageRef (c) { @@ -42,7 +42,7 @@ const Avatar = React.createClass({ return (
- +
); }