Skip to content

Commit 3639917

Browse files
committed
๐Ÿ›fix: drag & drop ์›ํ™œํ•˜๊ฒŒ ์ˆ˜์ •
1 parent e9088d1 commit 3639917

2 files changed

Lines changed: 21 additions & 11 deletions

File tree

โ€Žsrc/components/common/Bottom.tsxโ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ const Container = styled.div`
110110
left: 0;
111111
z-index: 10;
112112
113-
-ms-user-select: none;
113+
/* -ms-user-select: none;
114114
-moz-user-select: -moz-none;
115115
-webkit-user-select: none;
116116
-khtml-user-select: none;
117-
user-select: none;
117+
user-select: none; */
118118
`;
119119

120120
const Top = styled.div`

โ€Žsrc/components/common/Tag.tsxโ€Ž

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,13 @@ const Tag = (props: TagProps) => {
185185
e.stopPropagation();
186186
console.log("ํ„ฐ์น˜ ์‹œ์ž‘");
187187
const touch = e.touches[0];
188-
setStartPosition({ x: touch.clientX, y: touch.clientY });
188+
//setStartPosition({ x: touch.clientX, y: touch.clientY });
189+
// ์ปจํ…Œ์ด๋„ˆ์˜ ์ดˆ๊ธฐ ์œ„์น˜๋ฅผ ๊ฐ€์ ธ์™€ ์‹œ์ž‘ ์œ„์น˜์— ๋ฐ˜์˜
190+
const container = e.currentTarget.getBoundingClientRect();
191+
setStartPosition({
192+
x: touch.clientX - container.left,
193+
y: touch.clientY - container.top,
194+
});
189195

190196
e.currentTarget.addEventListener("touchmove", handleTouchMove, {
191197
passive: false,
@@ -387,25 +393,29 @@ const Box = styled.div<{
387393
background: ${theme.colors.gray800};
388394
${(props) => props.theme.fonts.body08};
389395
display: flex;
390-
${$hasEditIcon &&
391-
css`
396+
${
397+
$hasEditIcon &&
398+
css`
392399
height: 47px;
393400
padding: 9px 18px;
394401
border-radius: 200px;
395402
background: rgba(255, 255, 255, 0.2);
396403
backdrop-filter: blur(2px);
397404
${(props) => props.theme.fonts.title01};
398405
gap: 4px;
399-
`}
400-
${$hasName === false &&
401-
css`
406+
`
407+
}
408+
${
409+
$hasName === false &&
410+
css`
402411
padding: 7.5px 13px 7.5px 13px;
403-
`}
412+
`
413+
}
404414
`}
405415
406416
${({ $tagType, $orbitType }) =>
407-
$tagType === "letter" &&
408-
css`
417+
$tagType === "letter" &&
418+
css`
409419
display: block;
410420
max-width: 90px;
411421
padding: ${$orbitType === "2" ? "10px" : "11px 15px"};

0 commit comments

Comments
ย (0)