@maily-to/core 0.3.4 → 0.3.5
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/extensions/index.cjs +6 -5
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.mjs +6 -5
- package/dist/extensions/index.mjs.map +1 -1
- package/dist/index.cjs +18 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +18 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -9
- package/LICENSE +0 -21
|
@@ -4586,7 +4586,8 @@ function ImageView(props) {
|
|
|
4586
4586
|
newHeight = IMAGE_MAX_HEIGHT;
|
|
4587
4587
|
}
|
|
4588
4588
|
if (node.attrs.lockAspectRatio) {
|
|
4589
|
-
|
|
4589
|
+
const aspectRatio = node.attrs.aspectRatio && isFinite(node.attrs.aspectRatio) && node.attrs.aspectRatio > 0 ? node.attrs.aspectRatio : currentWidth / currentHeight;
|
|
4590
|
+
newHeight = getNewHeight(newWidth, aspectRatio);
|
|
4590
4591
|
}
|
|
4591
4592
|
setResizingStyle({ width: newWidth, height: newHeight });
|
|
4592
4593
|
if (!event2.buttons) {
|
|
@@ -4762,8 +4763,8 @@ function ImageView(props) {
|
|
|
4762
4763
|
"data-drag-handle": editor.isEditable,
|
|
4763
4764
|
className: cn("mly-image-drop-zone", isDraggingOver && "mly-drag-over"),
|
|
4764
4765
|
style: __spreadValues(__spreadProps(__spreadValues({}, hasImageSrc && status === "loaded" ? __spreadValues({
|
|
4765
|
-
width: width ? `${width}px` : void 0,
|
|
4766
|
-
height: height ? `${height}px` : void 0
|
|
4766
|
+
width: width && width !== "auto" ? `${width}px` : void 0,
|
|
4767
|
+
height: height && height !== "auto" ? `${height}px` : void 0
|
|
4767
4768
|
}, resizingStyle) : {}), {
|
|
4768
4769
|
overflow: "hidden",
|
|
4769
4770
|
position: "relative",
|
|
@@ -4815,8 +4816,8 @@ function ImageView(props) {
|
|
|
4815
4816
|
objectFit: "fill",
|
|
4816
4817
|
marginBottom: 0,
|
|
4817
4818
|
borderRadius,
|
|
4818
|
-
width: (resizingStyle == null ? void 0 : resizingStyle.width) ? `${resizingStyle.width}px` : width ? `${width}px` : "auto",
|
|
4819
|
-
height: (resizingStyle == null ? void 0 : resizingStyle.height) ? `${resizingStyle.height}px` : height ? `${height}px` : "auto"
|
|
4819
|
+
width: (resizingStyle == null ? void 0 : resizingStyle.width) ? `${resizingStyle.width}px` : width && width !== "auto" ? `${width}px` : "auto",
|
|
4820
|
+
height: (resizingStyle == null ? void 0 : resizingStyle.height) ? `${resizingStyle.height}px` : height && height !== "auto" ? `${height}px` : "auto"
|
|
4820
4821
|
}),
|
|
4821
4822
|
draggable: editor.isEditable,
|
|
4822
4823
|
className: cn(
|