Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rjwills28 opened this issue Jan 23, 2024 · 0 comments

Comments

@rjwills28
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant