@trafica/editor 1.0.49 → 1.0.51
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.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/styles/editor.css +17 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8656,7 +8656,7 @@ function EditorCore({
|
|
|
8656
8656
|
const rawX = e.clientX - cr.left - drag.offsetX + container.scrollLeft;
|
|
8657
8657
|
const rawY = e.clientY - cr.top - drag.offsetY + container.scrollTop;
|
|
8658
8658
|
const x = Math.max(0, Math.min(rawX, container.clientWidth - figW));
|
|
8659
|
-
const y = Math.max(0, Math.min(rawY, container.
|
|
8659
|
+
const y = Math.max(0, Math.min(rawY, container.offsetHeight - figH));
|
|
8660
8660
|
if (fig) {
|
|
8661
8661
|
fig.style.position = "absolute";
|
|
8662
8662
|
fig.style.left = `${x}px`;
|
|
@@ -8683,7 +8683,7 @@ function EditorCore({
|
|
|
8683
8683
|
const rawX = e.clientX - cr.left - drag.offsetX + container.scrollLeft;
|
|
8684
8684
|
const rawY = e.clientY - cr.top - drag.offsetY + container.scrollTop;
|
|
8685
8685
|
const x = Math.max(0, Math.min(rawX, container.clientWidth - figW));
|
|
8686
|
-
const y = Math.max(0, Math.min(rawY, container.
|
|
8686
|
+
const y = Math.max(0, Math.min(rawY, container.offsetHeight - figH));
|
|
8687
8687
|
setImageAttr(drag.imagePath, { x: Math.round(x), y: Math.round(y) })(engine);
|
|
8688
8688
|
};
|
|
8689
8689
|
document.addEventListener("mousemove", onMouseMove);
|