From 9dc29714d21d0ed2274a503e13430693920f4e95 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Tue, 18 Jun 2024 18:02:09 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EB=B6=88?= =?UTF-8?q?=EB=9F=AC=EC=98=A4=EA=B8=B0=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Roof.jsx | 6 ------ src/hooks/useCanvas.js | 26 ++------------------------ 2 files changed, 2 insertions(+), 30 deletions(-) diff --git a/src/components/Roof.jsx b/src/components/Roof.jsx index eee737bf..2d626780 100644 --- a/src/components/Roof.jsx +++ b/src/components/Roof.jsx @@ -16,7 +16,6 @@ export default function Roof() { handleRotate, attachCustomControlOnPolygon, saveImage, - loadImage } = useCanvas('canvas') const addRect = () => { @@ -189,11 +188,6 @@ export default function Roof() { > 이미지 저장 -
{ - - const file = e.target.files[0]; - const reader = new FileReader(); - - reader.onload = function(e) { - const dataURL = e.target.result; - fabric.Image.fromURL(dataURL, function(img) { - // 이미지 객체 생성 - img.selectable = false - canvas?.add(img); - - canvas?.renderAll(); - }); - }; - - reader.readAsDataURL(file); - } return { canvas, @@ -483,6 +462,5 @@ export function useCanvas(id) { handleRotate, attachCustomControlOnPolygon, saveImage, - loadImage } }