DiamondLightSource / cs-web-lib

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

Update webcam to display multiple on page #27

Closed abigailalexander closed 1 year ago

abigailalexander commented 1 year ago

The previous implementation of the webcam widget only allowed for a single one to be displayed per page - this was due to auto-sizing of the widget being based on the window size and each webcam widget having the same id. I have updated this now so that the scaling of webcams depends on the size of parent element, and each accepts a name/id to differentiate them. The tests have also been updated for the addition of an id/name.

The webcam sizing isn't ideal as if you attempt to make the page smaller than the original webcam size l it does not shrink, but instead starts to crop the edges. I haven't figured out the exact CSS needed to achieve this.

aawdls commented 1 year ago

The webcam sizing isn't ideal as if you attempt to make the page smaller than the original webcam size l it does not shrink, but instead starts to crop the edges. I haven't figured out the exact CSS needed to achieve this.

This is not currently a requirement for us; these widgets are not trying to be responsive to window size