diff --git a/src/components/fabric/QPolygon.js b/src/components/fabric/QPolygon.js index f255edc3..97fbc281 100644 --- a/src/components/fabric/QPolygon.js +++ b/src/components/fabric/QPolygon.js @@ -19,7 +19,7 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, { innerLines: [], children: [], initOptions: null, - defense: null, + direction: null, initialize: function (points, options, canvas) { // 소수점 전부 제거 points.forEach((point) => { diff --git a/src/components/ui/SurfaceShape.jsx b/src/components/ui/SurfaceShape.jsx index f6fda227..e2459d90 100644 --- a/src/components/ui/SurfaceShape.jsx +++ b/src/components/ui/SurfaceShape.jsx @@ -28,7 +28,8 @@ export const SurfaceShapeModal = ({ canvas }) => { const [length4, setLength4] = useState(0) const [length5, setLength5] = useState(0) - const [defense, setDefense] = useState('south') + // 방향 + const [direction, setDirection] = useState('south') /** * 최대 5개의 length @@ -630,7 +631,7 @@ export const SurfaceShapeModal = ({ canvas }) => { } canvas?.add(obj) - obj.set({ defense: defense }) + obj.set({ direction: direction }) setCurrentPattern(obj) canvas?.renderAll() }) @@ -848,30 +849,30 @@ export const SurfaceShapeModal = ({ canvas }) => {