Skip to content
Open
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
36 changes: 22 additions & 14 deletions packages/pluggableWidgets/image-web/src/Image.editorConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,22 +124,30 @@
): StructurePreviewProps | null {
const palette = structurePreviewPalette[isDarkMode ? "dark" : "light"];

if (!values.isBackgroundImage) {
const [width, height, property] = getImageWithDimensions();
return {
type: "Image",
document: decodeURIComponent(
(isDarkMode ? StructurePreviewImageSvgDark : StructurePreviewImageSvg).replace(
"data:image/svg+xml,",
""
)
),
property,
width,
height
};
if (!values.isBackgroundImage) {

Check failure on line 127 in packages/pluggableWidgets/image-web/src/Image.editorConfig.ts

View workflow job for this annotation

GitHub Actions / Run code quality check

Insert `····`
let [width, height, property] = getImageWithDimensions();

Check failure on line 128 in packages/pluggableWidgets/image-web/src/Image.editorConfig.ts

View workflow job for this annotation

GitHub Actions / Run code quality check

Insert `····`

if (values.datasource === "icon") {

Check failure on line 130 in packages/pluggableWidgets/image-web/src/Image.editorConfig.ts

View workflow job for this annotation

GitHub Actions / Run code quality check

Replace `····` with `········`
const iconSize = values.iconSize ?? 14;

Check failure on line 131 in packages/pluggableWidgets/image-web/src/Image.editorConfig.ts

View workflow job for this annotation

GitHub Actions / Run code quality check

Insert `····`
width = iconSize;

Check failure on line 132 in packages/pluggableWidgets/image-web/src/Image.editorConfig.ts

View workflow job for this annotation

GitHub Actions / Run code quality check

Insert `····`
height = iconSize;

Check failure on line 133 in packages/pluggableWidgets/image-web/src/Image.editorConfig.ts

View workflow job for this annotation

GitHub Actions / Run code quality check

Replace `········` with `············`
property = undefined;

Check failure on line 134 in packages/pluggableWidgets/image-web/src/Image.editorConfig.ts

View workflow job for this annotation

GitHub Actions / Run code quality check

Insert `····`
}

Check failure on line 135 in packages/pluggableWidgets/image-web/src/Image.editorConfig.ts

View workflow job for this annotation

GitHub Actions / Run code quality check

Insert `····`

return {

Check failure on line 137 in packages/pluggableWidgets/image-web/src/Image.editorConfig.ts

View workflow job for this annotation

GitHub Actions / Run code quality check

Insert `····`
type: "Image",

Check failure on line 138 in packages/pluggableWidgets/image-web/src/Image.editorConfig.ts

View workflow job for this annotation

GitHub Actions / Run code quality check

Insert `····`
document: decodeURIComponent(
(isDarkMode ? StructurePreviewImageSvgDark : StructurePreviewImageSvg).replace(
"data:image/svg+xml,",
""
)
),
property,
width,
height
};
}

const titleHeader: RowLayoutProps = {
type: "RowLayout",
columnSize: "fixed",
Expand Down
Loading