mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 19:57:52 +01:00
editor: fix clamped image size is larger than editor (#7324)
This commit is contained in:
@@ -59,7 +59,7 @@ export function ImageComponent(
|
|||||||
once: true
|
once: true
|
||||||
});
|
});
|
||||||
|
|
||||||
const dom = editor.view.dom.parentElement || editor.view.dom;
|
const dom = editor.view.dom;
|
||||||
|
|
||||||
const size =
|
const size =
|
||||||
editor.view.dom.clientWidth === 0
|
editor.view.dom.clientWidth === 0
|
||||||
@@ -267,7 +267,7 @@ export function ImageComponent(
|
|||||||
title={title}
|
title={title}
|
||||||
sx={{
|
sx={{
|
||||||
animation: bloburl || src ? "0.2s ease-in 0s 1 fadeIn" : "none",
|
animation: bloburl || src ? "0.2s ease-in 0s 1 fadeIn" : "none",
|
||||||
objectFit: "scale-down",
|
objectFit: "contain",
|
||||||
width: editor.isEditable ? "100%" : size.width,
|
width: editor.isEditable ? "100%" : size.width,
|
||||||
height: editor.isEditable ? "100%" : size.height,
|
height: editor.isEditable ? "100%" : size.height,
|
||||||
border: selected
|
border: selected
|
||||||
|
|||||||
Reference in New Issue
Block a user