Page MenuHomePhabricator

Size of preview and real image does not match in MediaViewer
Closed, ResolvedPublic

Description

Watch https://www.mediawiki.org/wiki/Lightbox_demo#mediaviewer/File:RhB_Ge_4-4_II_Wiesener_Viadukt.jpg load for example - there is a size change when it finishes loading.

Event Timeline

Tgr raised the priority of this task from to Medium.
Tgr updated the task description. (Show Details)
Tgr added projects: Multimedia, MediaViewer.
Tgr added subscribers: Aklapper, Tgr.

I have looked upon this issue. What i can figure it out is that the metadatapanel "top" property changes. Can you please give me some guidance with why this value is intially set to $( window ).height() - 83 (why 83?)

gerritbot subscribed.

Change 186212 had a related patch set uploaded (by Phoenix303):
Match size of preview and real image

https://gerrit.wikimedia.org/r/186212

Patch-For-Review

I have submitted the patch. Please let me know if there is any problem with the patch.

Gilles moved this task from Untriaged to Next up on the Multimedia board.
Gilles moved this task from Next up to Ready for testing on the Multimedia board.
Gilles subscribed.

I have looked upon this issue. What i can figure it out is that the metadatapanel "top" property changes. Can you please give me some guidance with why this value is intially set to $( window ).height() - 83 (why 83?)

There is an "above-the-fold" part of the metadata panel, which contains the most important information like caption or author name which should always be visible. 83 is the height of that part in pixels.

(The height changed a few times so I wouldn't be terribly surprised if there was some bug in calculating it.)

Change 186212 merged by jenkins-bot:
Match size of preview and real image

https://gerrit.wikimedia.org/r/186212