Skip to content

Commit 405299b

Browse files
chore: add comments
1 parent 527d75d commit 405299b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/bot-web-ui/src/components/draggable/draggable.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ export default function Draggable({
5858
minHeight={height}
5959
minWidth={minWidth}
6060
onDrag={(e, data) => {
61+
//we need these calculations since we no longer use the 'transform: translate(x, y)' property
62+
//as it causes unexpected behaviour of Beta Chart styles & helps avoid bounce bug upon the first drag
6163
data.node.style.left = `${data.lastX - first_drag_x + first_left + data.deltaX}px`;
6264
data.node.style.top = `${data.lastY - first_drag_y + first_top + data.deltaY}px`;
6365
}}

0 commit comments

Comments
 (0)