DiamondLightSource / cs-web-lib

Library form of control system web UI prototype
Apache License 2.0
1 stars 1 forks source link

Scaling issue when an embeddedDisplay does not take up full display #28

Closed rjwills28 closed 1 year ago

rjwills28 commented 1 year ago

When trying to build a view that includes multiple embedded display or an embedded display and another elements (for example a webcam) the auto-scaling of the embeddedDisplay does not work correctly. This is because an Absolute position is used to define the location of the embeddedDisplay and this does not take up the whole of the browser display window. It means that you end up cutting off parts of the embeddedDisplay - example below. The amount visible depends on the size of the browser window hence suggestion that the scaling is not working properly.

size1

I think the issue is that the previous scaling we implemented was based on the browser window size and does not take into account this case where there is a position allocated for the embeddedDisplay. This needs fixing the cs-web-lib.

rjwills28 commented 1 year ago

Also noticed some bad scaling issues when refactoring cs-web-proto to use cs-web-lib. These OPIs look OK in the original so a change in cs-web-lib has caused the scaling to got awry in a few cases.

Screenshot from 2023-05-15 17-33-02

rjwills28 commented 1 year ago

Fixed in https://github.com/dls-controls/cs-web-lib/pull/34.