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
9 changes: 9 additions & 0 deletions src/ui/widgets/Image/image.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.Image {
max-width: 100%;
min-width:100%;
min-height: 100%;
width: 100%;
height: 100%;
object-fit: contain;
overflow: hidden;
}
2 changes: 2 additions & 0 deletions src/ui/widgets/Image/image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
ColorPropOpt
} from "../propTypes";
import { registerWidget } from "../register";
import classes from "./image.module.css";
import { Box } from "@mui/material";

const widgetName = "image";
Expand Down Expand Up @@ -86,6 +87,7 @@ export const ImageComponent = (
return (
<Box sx={fullStyle} onClick={onClick}>
<img
className={classes.Image}
src={imageFileName}
alt={props.alt || undefined}
style={{
Expand Down
6 changes: 6 additions & 0 deletions src/ui/widgets/Symbol/__snapshots__/symbol.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ exports[`<Symbol /> from .bob file > matches snapshot (using fallback symbol) 1`
class="MuiBox-root css-lj78bd"
>
<img
class="_Image_171889"
src="img 1.gif"
style="display: block; transform: rotate(0deg) scaleX(1) scaleY(1); object-fit: contain; object-position: top left; opacity: 1;"
/>
Expand All @@ -19,6 +20,7 @@ exports[`<Symbol /> from .bob file > matches snapshot (with index) 1`] = `
class="MuiBox-root css-lj78bd"
>
<img
class="_Image_171889"
src="img 3.svg"
style="display: block; transform: rotate(0deg) scaleX(1) scaleY(1); object-fit: contain; object-position: top left; opacity: 1;"
/>
Expand All @@ -32,6 +34,7 @@ exports[`<Symbol /> from .bob file > matches snapshot (with rotation) 1`] = `
class="MuiBox-root css-lj78bd"
>
<img
class="_Image_171889"
src="img 1.gif"
style="display: block; transform: rotate(45deg) scaleX(1) scaleY(1); object-fit: contain; object-position: top left; opacity: 1;"
/>
Expand All @@ -45,6 +48,7 @@ exports[`<Symbol /> from .bob file > matches snapshot (without index) 1`] = `
class="MuiBox-root css-lj78bd"
>
<img
class="_Image_171889"
src="img 1.gif"
style="display: block; transform: rotate(0deg) scaleX(1) scaleY(1); object-fit: contain; object-position: top left; opacity: 1;"
/>
Expand All @@ -58,6 +62,7 @@ exports[`<Symbol /> from .opi file > matches snapshot (with rotation) 1`] = `
class="MuiBox-root css-lj78bd"
>
<img
class="_Image_171889"
src="img 1.gif"
style="display: block; transform: rotate(45deg) scaleX(1) scaleY(1); object-fit: contain; object-position: top left; opacity: 1;"
/>
Expand All @@ -71,6 +76,7 @@ exports[`<Symbol /> from .opi file > matches snapshot 1`] = `
class="MuiBox-root css-lj78bd"
>
<img
class="_Image_171889"
src="img 1.gif"
style="display: block; transform: rotate(0deg) scaleX(1) scaleY(1); object-fit: contain; object-position: top left; opacity: 1;"
/>
Expand Down
2 changes: 1 addition & 1 deletion src/ui/widgets/Webcam/webcam.module.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
img {
.Webcam {
max-width: 100%;
min-width:100%;
min-height: 100%;
Expand Down
2 changes: 1 addition & 1 deletion src/ui/widgets/Webcam/webcam.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const WebcamComponent = (
>
<img
id={props.name}
className={classes.img}
className={classes.Webcam}
src={props.url}
alt={`Loading Webcam MJPEG stream...`}
onError={onError}
Expand Down
Loading