-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FE][Feat] #204 : 캔버스 내 마커 추가 및 삭제 기능 구현 #207
Conversation
…pwm-2024/web28-DDara into feature/fe/#204-addMarker
…ampwm-2024/web28-DDara into feature/fe/#204-addMarker
…ampwm-2024/web28-DDara into feature/fe/#204-addMarker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
코멘트좀 남기려고 하는데 close됐군요 ㅎ
const scaleRef = useRef(STEP_SCALES[7]); | ||
const viewPosRef = useRef(INITIAL_POSITION); | ||
const [iconImage, setIconImage] = useState<HTMLImageElement | null>(null); | ||
const [markerPoint, setMarkerPoint] = useState<IPoint | null>(props.point); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
point가 props에도 있고 여기에도 있고 차이점이 좀 헷갈릴듯.
} | ||
}, [markerPoint, iconImage]); | ||
|
||
return { mark, scaleRef, viewPosRef }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
근데 이름에 point, mark 뭔지는 알겠으나 더 구체적인 이름으로하면 더 좋을듯.
} | ||
|
||
const INITIAL_POSITION = { x: 0, y: 0 }; | ||
const STEP_SCALES = [100, 50, 30, 20, 10, 5, 3, 1, 0.5, 0.3, 0.1, 0.05, 0.03, 0.02, 0.01, 0.005]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이건 공통상수로 정의해서 같이 사용해도 될듯. 다른 파일에도 보여서.
🔍 변경 사항
✅ 체크리스트 (Checklist)
🔄 관련 이슈 (Linked Issues)
#204
📷 스크린샷 및 동영상 (선택 사항)
default.mp4