mirror of
https://github.com/makeplane/plane.git
synced 2026-04-30 13:09:36 -05:00
fix: pass update image size (#5686)
This commit is contained in:
committed by
GitHub
parent
6b63e050ae
commit
8dabe839f3
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user