mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-17 04:43:18 +00:00
Add shadow when scrolling panel
When the panel is scrolling a shadow is added to better communicate that the panel moves over the image. More details: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/193 Change-Id: I06866a3a034977002b98658a3d09b5421b583ee7
This commit is contained in:
parent
43d88d8d30
commit
956cd4b47e
|
@ -225,6 +225,7 @@
|
|||
var panelIsOpen = !!$.scrollTo().scrollTop();
|
||||
|
||||
this.$dragIcon.toggleClass( 'panel-open', panelIsOpen );
|
||||
this.$container.toggleClass( 'panel-open', panelIsOpen );
|
||||
|
||||
if ( panelIsOpen && !this.panelIsOpen ) { // just opened (this is skipped in some cases, see the $dragIcon click handler)
|
||||
this.$container.trigger( 'mmv-metadata-open' );
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
.mw-mmv-post-image {
|
||||
.animation( mw-mmv-appear-animation 0.5s ease 0s 1 normal forwards );
|
||||
transition: box-shadow 0.25s;
|
||||
|
||||
&.invite {
|
||||
.animation( mw-mmv-invite-animation 0.9s ease 0.2s 1 normal forwards );
|
||||
}
|
||||
|
@ -16,6 +18,10 @@
|
|||
.jq-fullscreened & {
|
||||
.animation(none);
|
||||
}
|
||||
|
||||
&.panel-open {
|
||||
box-shadow: 0 -4px 0px rgba(0,0,0,0.2);
|
||||
}
|
||||
}
|
||||
|
||||
.mw-mmv-appear-animation() {
|
||||
|
|
Loading…
Reference in a new issue