Skip to content

Commit

Permalink
๐Ÿ’ก remove : position ์ฝ˜์†”๋กœ๊ทธ ์‚ญ์ œ
Browse files Browse the repository at this point in the history
  • Loading branch information
goodafteryoon committed Apr 19, 2023
1 parent 8f1cabb commit 3f72f73
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/layout/Default.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,11 @@ const Default = () => {

// ์ด์ „ ์œ„์น˜ ์ •๋ณด๊ฐ€ ์žˆ๊ณ , ์ด์ „ ์œ„์น˜์™€ ์ƒˆ๋กœ์šด ์œ„์น˜์˜ ๊ฑฐ๋ฆฌ๊ฐ€ 100m ์ด์ƒ์ธ ๊ฒฝ์šฐ์—๋งŒ ์—…๋ฐ์ดํŠธ
if (prevPosition.current && calculateDistance(prevPosition.current, newPosition) >= 100) {
console.log('์—…๋ฐ์ดํŠธ ๋œ Position : ', newPosition)
setPosition(position)
prevPosition.current = newPosition
}
// ์ด์ „ ์œ„์น˜ ์ •๋ณด๊ฐ€ ์—†๋Š” ๊ฒฝ์šฐ์—๋Š” ์ƒˆ๋กœ์šด ์œ„์น˜ ์ •๋ณด๋ฅผ ์ €์žฅํ•˜๊ณ  ์—…๋ฐ์ดํŠธํ•˜์ง€ ์•Š์Œ
else if (!prevPosition.current) {
console.log('์ฒ˜์Œ Position', newPosition)
setPosition(position)
prevPosition.current = newPosition
}
Expand Down

0 comments on commit 3f72f73

Please sign in to comment.