comparison src/dad.js @ 8:969d5980b375

add lists
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 23 Apr 2023 23:55:37 -0600
parents 4d699321068f
children eee8862be4c7
comparison
equal deleted inserted replaced
7:332d3e280f7e 8:969d5980b375
124 original.setAttribute('dad-original',''); 124 original.setAttribute('dad-original','');
125 dragging.setAttribute('dad-dragging',''); 125 dragging.setAttribute('dad-dragging','');
126 let rect = original.getBoundingClientRect(); 126 let rect = original.getBoundingClientRect();
127 dragging.style.left = `${rect.x}px`; 127 dragging.style.left = `${rect.x}px`;
128 dragging.style.top = `${rect.y}px`; 128 dragging.style.top = `${rect.y}px`;
129 dragging.style.width = `${rect.width}px`;
130 dragging.style.heigh = `${rect.heigh}px`;
129 original.parentNode.appendChild(dragging); 131 original.parentNode.appendChild(dragging);
130 } 132 }
131 133
132 function onMouseDown(event) { 134 function onMouseDown(event) {
133 start(event); 135 start(event);