fix: pass update image size (#5686)
This commit is contained in:
parent
6b63e050ae
commit
8dabe839f3
2 changed files with 4 additions and 4 deletions
|
|
@ -158,8 +158,8 @@ export const CustomImageBlock: React.FC<CustomImageNodeViewProps> = (props) => {
|
|||
containerClassName="absolute top-1 right-1 z-20 bg-black/40 rounded opacity-0 pointer-events-none group-hover/image-component:opacity-100 group-hover/image-component:pointer-events-auto transition-opacity"
|
||||
image={{
|
||||
src,
|
||||
height,
|
||||
width,
|
||||
height: size.height,
|
||||
width: size.width,
|
||||
}}
|
||||
/>
|
||||
{editor.isEditable && selected && <div className="absolute inset-0 size-full bg-custom-primary-500/30" />}
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ export const ImageFullScreenAction: React.FC<Props> = (props) => {
|
|||
// states
|
||||
const [magnification, setMagnification] = useState(1);
|
||||
// derived values
|
||||
const widthInNumber = useMemo(() => Number(width.replace("px", "")), [width]);
|
||||
const heightInNumber = useMemo(() => Number(height.replace("px", "")), [height]);
|
||||
const widthInNumber = useMemo(() => Number(width?.replace("px", "")), [width]);
|
||||
const heightInNumber = useMemo(() => Number(height?.replace("px", "")), [height]);
|
||||
const aspectRatio = useMemo(() => widthInNumber / heightInNumber, [heightInNumber, widthInNumber]);
|
||||
// close handler
|
||||
const handleClose = useCallback(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue