Merge "Fix clipping of text when metadata panel is closed"

This commit is contained in:
jenkins-bot 2015-06-22 13:15:49 +00:00 committed by Gerrit Code Review
commit 82c087750d
2 changed files with 17 additions and 5 deletions

View file

@ -126,6 +126,9 @@
this.canvas.empty();
this.buttons.empty();
this.$main.addClass( 'metadata-panel-is-closed' )
.removeClass( 'metadata-panel-is-open' );
};
/**
@ -205,9 +208,11 @@
// cross-communication between panel and canvas, sort of
this.$postDiv.on( 'mmv-metadata-open.lip', function () {
ui.$main.addClass( 'metadata-panel-is-open' );
ui.$main.addClass( 'metadata-panel-is-open' )
.removeClass( 'metadata-panel-is-closed' );
} ).on( 'mmv-metadata-close.lip', function () {
ui.$main.removeClass( 'metadata-panel-is-open' );
ui.$main.removeClass( 'metadata-panel-is-open' )
.addClass( 'metadata-panel-is-closed' );
} );
this.$wrapper.on( 'mmv-panel-close-area-click.lip', function () {
ui.panel.scroller.toggle( 'down' );

View file

@ -72,10 +72,10 @@
color: #555;
padding: 0 0 @padding-right;
font-size: 0.85em;
height: @metadatabar-below-fold-pushup-height - @space-above-credit - @fold-separator-border-width; // needs explicit height for text truncation logic
&.mw-mmv-ttf-untruncated {
height: auto;
.metadata-panel-is-closed {
height: @metadatabar-below-fold-pushup-height - @space-above-credit - @fold-separator-border-width; // needs explicit height for text truncation logic
line-height: @metadatabar-below-fold-pushup-height - @space-above-credit - @fold-separator-border-width;
}
&.empty {
@ -173,6 +173,13 @@
display: none;
}
// Make sure the next list item is not visible when the
// metadata panel is closed
.metadata-panel-is-closed &.mw-mmv-license-li {
height: @metadatabar-below-fold-pushup-height - @space-above-credit;
line-height: @metadatabar-below-fold-pushup-height - @space-above-credit;
}
&:before {
display: inline-block;
vertical-align: middle;