@yogiswara/honcho-editor-ui 2.1.13 → 2.1.15
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.
|
@@ -27,7 +27,7 @@ const AlbumImageGallery = (props) => {
|
|
|
27
27
|
};
|
|
28
28
|
return (_jsx(Box, { sx: { m: 0.5 }, children: _jsx(GalleryImageItem, { margin: "0px", index: index,
|
|
29
29
|
// UPDATED: Pass the new, correctly-typed object.
|
|
30
|
-
photo: imageItemPhotoProps, direction: "column", isFullScreenMode: false, isSelected: photo.isSelected, isSelectedMode: isSelectedMode, isHiddenGallery: isHiddenGallery, onPreview: onPreview(photo), onSelectedMode: onSelectedMode, onToggleSelect: onToggleSelect(photo), enableEditor: enableEditor, adjustments: photo.adjustments, frame: photo.frame }) }, photo.key));
|
|
30
|
+
photo: imageItemPhotoProps, direction: "column", isFullScreenMode: false, isSelected: photo.isSelected, isSelectedMode: isSelectedMode, isHiddenGallery: isHiddenGallery, onPreview: onPreview(photo), onSelectedMode: onSelectedMode, onToggleSelect: onToggleSelect(photo), enableEditor: enableEditor, adjustments: photo.adjustments, frame: photo.frame, data: photo }) }, photo.key));
|
|
31
31
|
}) }) }) }));
|
|
32
32
|
};
|
|
33
33
|
export default AlbumImageGallery;
|
|
@@ -6,12 +6,12 @@ interface PhotoProps<T> {
|
|
|
6
6
|
width: number;
|
|
7
7
|
height: number;
|
|
8
8
|
key: string;
|
|
9
|
-
photo?: T;
|
|
10
9
|
}
|
|
11
10
|
interface Props {
|
|
12
11
|
margin?: any;
|
|
13
12
|
index: number;
|
|
14
13
|
photo: PhotoProps<GallerySetup>;
|
|
14
|
+
data: GallerySetup;
|
|
15
15
|
direction: "row" | "column";
|
|
16
16
|
isSelectedMode: boolean;
|
|
17
17
|
isFullScreenMode: boolean;
|
|
@@ -20,8 +20,10 @@ const selectedImgStyle = {
|
|
|
20
20
|
// transition: "transform .135s cubic-bezier(0.0,0.0,0.2,1),opacity linear .15s"
|
|
21
21
|
};
|
|
22
22
|
const GalleryImageItem = (props) => {
|
|
23
|
-
const { photo, margin, adjustments, isSelected = false } = props;
|
|
23
|
+
const { photo, margin, adjustments, isSelected = false, data } = props;
|
|
24
24
|
const theme = useTheme();
|
|
25
|
+
const imageData = data;
|
|
26
|
+
console.debug("Image src", imageData.src);
|
|
25
27
|
const hasAdjustments = useMemo(() => {
|
|
26
28
|
if (!adjustments)
|
|
27
29
|
return false;
|
|
@@ -159,6 +161,6 @@ const GalleryImageItem = (props) => {
|
|
|
159
161
|
xs: props.isSelectedMode ? "visible" : "hidden",
|
|
160
162
|
sm: "visible",
|
|
161
163
|
},
|
|
162
|
-
}, className: "checkbox", children: _jsx(TickCircle, { style: { width: "24px", height: "24px" }, color: "white" }) }))), _jsx(CardMedia, { id: "card_media", component: "img", className: "image", loading: "lazy", alt:
|
|
164
|
+
}, className: "checkbox", children: _jsx(TickCircle, { style: { width: "24px", height: "24px" }, color: "white" }) }))), _jsx(CardMedia, { id: "card_media", component: "img", className: "image", loading: "lazy", alt: imageData.alt ?? "Image", sx: imageSx, src: imageData.src, width: "100%", onClick: handleImageClick })] }, photo.key));
|
|
163
165
|
};
|
|
164
166
|
export default GalleryImageItem;
|