Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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" />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down