From d50d1ecaccdd91c418fb2c176551524f44072c13 Mon Sep 17 00:00:00 2001 From: Matchu Date: Tue, 22 Sep 2020 05:01:56 -0700 Subject: [PATCH] fix bug that reloaded all layers on resize --- src/app/components/OutfitCanvas.js | 35 ++++++++++++------------------ 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/src/app/components/OutfitCanvas.js b/src/app/components/OutfitCanvas.js index cf8167e..b23e19d 100644 --- a/src/app/components/OutfitCanvas.js +++ b/src/app/components/OutfitCanvas.js @@ -78,11 +78,6 @@ function OutfitCanvas({ children, width, height }) { } }, [stage, width, height]); - // Set the canvas's internal dimensions to be higher, if the device has high - // DPI like retina. But we'll keep the layout width/height as expected! - const internalWidth = width * window.devicePixelRatio; - const internalHeight = height * window.devicePixelRatio; - if (loading) { return null; } @@ -90,8 +85,7 @@ function OutfitCanvas({ children, width, height }) { return (