From a30e669df24e680fa94fc954144d2fa9b04fcf4f Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Sun, 29 Jan 2017 05:26:50 -0800 Subject: [PATCH] Fix avatar scaling on high-DPI displays (#573) --- app/assets/javascripts/components/components/avatar.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/components/components/avatar.jsx b/app/assets/javascripts/components/components/avatar.jsx index b8420014bd6..8d5c90b3349 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 (
- +
); }