Skip to content

Commit e28b4c7

Browse files
committed
added a comment, closes #135
1 parent a0cf28b commit e28b4c7

File tree

1 file changed

+2
-0
lines changed
  • 2-ui/3-event-details/4-mouse-drag-and-drop

1 file changed

+2
-0
lines changed

2-ui/3-event-details/4-mouse-drag-and-drop/article.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ ball.onmousedown = function(event) { // (1) start the process
2929
// (2) prepare to moving: make absolute and on top by z-index
3030
ball.style.position = 'absolute';
3131
ball.style.zIndex = 1000;
32+
// move it out of any current parents directly into body
33+
// to make it positioned relative to the body
3234
document.body.append(ball);
3335
// ...and put that absolutely positioned ball under the cursor
3436

0 commit comments

Comments
 (0)