DiamondLightSource / SynchWeb

ISPyB web application
http://diamondlightsource.github.io/SynchWeb/
Apache License 2.0
15 stars 31 forks source link

LIMS-380: Fix position of autoPROC images #831

Closed ndg63276 closed 2 months ago

ndg63276 commented 2 months ago

JIRA ticket: LIMS-380

Summary:

https://github.com/DiamondLightSource/SynchWeb/pull/390 introduced a bug where image modals opened in autoPROC's summary file opened at the top of the page, requiring much scrolling just to see them.

Changes:

To test:

gfrn commented 2 months ago

There is a small bug where it doesn't take up 100% of the parent element's width once the dialogue is opened. I believe there is a simpler alternative to JS, which is setting width and height of the iframe to 98%.

It comes with the added benefit of fixing a bug where once the page is resized from mobile size to desktop size, it retains the original size.

I can make a PR for this PR, with the changes made, seems to work with xia2.html and summary_inlined.html, unless there is a known bug with using CSS that way

ndg63276 commented 2 months ago

Please, be my guest :)

ndg63276 commented 2 months ago

Actually, probably easier for me to add a commit. Is this what you meant? I tried without the onload but without content the sizing was wrong.

gfrn commented 2 months ago

I think that's because further down, the default height/width is set to a pixel value on load, I'll create a PR, it may be easier that way

https://github.com/DiamondLightSource/SynchWeb/pull/838

ndg63276 commented 2 months ago

Yep that's much neater, thanks!