diff --git a/package.json b/package.json
index a6b4f511..bbd8c881 100644
--- a/package.json
+++ b/package.json
@@ -36,6 +36,7 @@
"postcss": "^8",
"prettier": "^3.3.3",
"prisma": "^5.18.0",
+ "react-color-palette": "^7.2.2",
"sass": "^1.77.8",
"tailwindcss": "^3.4.1"
}
diff --git a/public/drawTemplates/153302.svg b/public/drawTemplates/153302.svg
new file mode 100644
index 00000000..3b1c97b0
--- /dev/null
+++ b/public/drawTemplates/153302.svg
@@ -0,0 +1,23 @@
+
+
+
diff --git a/public/drawTemplates/shape21.svg b/public/drawTemplates/shape21.svg
new file mode 100644
index 00000000..a2d901e7
--- /dev/null
+++ b/public/drawTemplates/shape21.svg
@@ -0,0 +1,4 @@
+
+
diff --git a/src/components/SettingsModal.jsx b/src/components/GridSettingsModal.jsx
similarity index 87%
rename from src/components/SettingsModal.jsx
rename to src/components/GridSettingsModal.jsx
index dc7dc5ba..35bb1793 100644
--- a/src/components/SettingsModal.jsx
+++ b/src/components/GridSettingsModal.jsx
@@ -4,8 +4,10 @@ import { useRecoilState, useRecoilValue } from 'recoil'
import { modalContent, modalState } from '@/store/modalAtom'
import { guideLineState, horiGuideLinesState, vertGuideLinesState } from '@/store/canvasAtom'
import { fabric } from 'fabric'
+import { ColorPicker, useColor } from 'react-color-palette'
+import 'react-color-palette/css'
-export default function SettingsModal(props) {
+export default function GridSettingsModal(props) {
const { canvasProps } = props
const [isCustomGridSetting, setIsCustomGridSetting] = useState(true)
const [gridCheckedValue, setGridCheckValue] = useState([])
@@ -21,6 +23,15 @@ export default function SettingsModal(props) {
const gridSettingArray = []
+ const [guideColor, setGuideColor] = useColor('rgb(200, 15, 15)')
+ const [colorPickerShow, setColorPickerShow] = useState(false)
+
+ const boxStyle = {
+ width: '50px',
+ height: '30px',
+ border: '1px solid black',
+ backgroundColor: guideColor.hex,
+ }
useEffect(() => {
moduleLength.current.value = 90
customModuleHoriLength.current.value = 90
@@ -56,7 +67,7 @@ export default function SettingsModal(props) {
const horizontalLine = new fabric.Line(
[0, i * moduleVertLength - moduleVertLength / 2, canvasProps.width, i * moduleVertLength - moduleVertLength / 2],
{
- stroke: 'gray',
+ stroke: guideColor.hex,
strokeWidth: 1,
selectable: true,
lockMovementX: true,
@@ -65,6 +76,8 @@ export default function SettingsModal(props) {
lockScalingX: true,
lockScalingY: true,
name: 'guideLine',
+ strokeDashArray: [5, 2],
+ opacity: 0.3,
direction: 'horizontal',
},
)
@@ -76,7 +89,7 @@ export default function SettingsModal(props) {
const verticalLine = new fabric.Line(
[i * moduleHoriLength - moduleHoriLength / 2, 0, i * moduleHoriLength - moduleHoriLength / 2, canvasProps.height],
{
- stroke: 'gray',
+ stroke: guideColor.hex,
strokeWidth: 1,
selectable: true,
lockMovementX: true,
@@ -85,6 +98,8 @@ export default function SettingsModal(props) {
lockScalingX: true,
lockScalingY: true,
name: 'guideLine',
+ strokeDashArray: [5, 2],
+ opacity: 0.3,
direction: 'vertical',
},
)
@@ -118,7 +133,9 @@ export default function SettingsModal(props) {
if (gridCheckedValue.includes('dot')) {
const circle = new fabric.Circle({
radius: 2,
- fill: 'red',
+ fill: 'white',
+ stroke: guideColor.hex,
+ strokeWidth: 0.7,
originX: 'center',
originY: 'center',
selectable: false,
@@ -216,10 +233,18 @@ export default function SettingsModal(props) {
임의간격
-
-
- 종횡연동
-
+
+ 가이드컬러
setColorPickerShow(!colorPickerShow)}>
+
+ {colorPickerShow && (
+
+ )}
+
+
+
+ 종횡연동
+
+
@@ -229,6 +254,7 @@ export default function SettingsModal(props) {
mm
+