Skip to content

Image widget stretchToFit property does not always give correct behaviour #45

@rjwills28

Description

@rjwills28

This issue was noted when testing an unrelated PR: #44.

If the div/area for an image widget is the same or as large as the actual image, the image will be stretch to fill the space if stretchToFit = True and not preserve the aspect ratio. This matches the behaviour in CS-Studio.
However the behaviour looks slightly different when you shrink an image so that the div is smaller than the image size. In this case, if stretchToFit is False, then it does not try to shrink the image to the size of the div and instead just shows a smaller portion of the image. In the example below you can see that CSS shows the top-left corner of the DLS building, while the web shows some portion in the middle.
image_css
image_web
Behaviour in the web app should probably be updated to match that of CS-Studio.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions