   div.style.left = `${x1}px`;
          div.style.top = `${y1}px`;

          const dy = y2 - y1;
          const dx = x2 - x1;
          const angle = 180 * Math.atan2(dy, dx) / Math.PI;
          const length = Math.hypot(dx, dy);

          div.style.transformOrigin = '0 0';
          div.style.transform = `translate(0, -50%) rotate(${angle}deg)`;
          div.style.width = `${length}px`;
          div.style.height = `${lineWidth}px`;
          div.style.background = color;
          d.appendChild(div)