@trafica/editor 1.0.49 → 1.0.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -8654,7 +8654,7 @@ function EditorCore({
8654
8654
  const rawX = e.clientX - cr.left - drag.offsetX + container.scrollLeft;
8655
8655
  const rawY = e.clientY - cr.top - drag.offsetY + container.scrollTop;
8656
8656
  const x = Math.max(0, Math.min(rawX, container.clientWidth - figW));
8657
- const y = Math.max(0, Math.min(rawY, container.scrollHeight - figH));
8657
+ const y = Math.max(0, Math.min(rawY, container.offsetHeight - figH));
8658
8658
  if (fig) {
8659
8659
  fig.style.position = "absolute";
8660
8660
  fig.style.left = `${x}px`;
@@ -8681,7 +8681,7 @@ function EditorCore({
8681
8681
  const rawX = e.clientX - cr.left - drag.offsetX + container.scrollLeft;
8682
8682
  const rawY = e.clientY - cr.top - drag.offsetY + container.scrollTop;
8683
8683
  const x = Math.max(0, Math.min(rawX, container.clientWidth - figW));
8684
- const y = Math.max(0, Math.min(rawY, container.scrollHeight - figH));
8684
+ const y = Math.max(0, Math.min(rawY, container.offsetHeight - figH));
8685
8685
  setImageAttr(drag.imagePath, { x: Math.round(x), y: Math.round(y) })(engine);
8686
8686
  };
8687
8687
  document.addEventListener("mousemove", onMouseMove);