Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update: Make media viewer settings menu larger so scrollbars don't show #149

Merged
merged 1 commit into from
May 25, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/lib/viewers/media/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,10 @@ const SUBTITLES_SUBITEM_TEMPLATE = `<div class="bp-media-settings-sub-item" data
setMenuContainerDimensions(menu) {
// NOTE: need to explicitly set the dimensions in order to get css transitions. width=auto doesn't work with css transitions
this.settingsEl.style.width = `${menu.offsetWidth + 18}px`;
// height = n * $item-height + 2 * $padding (see Settings.scss)
// height = n * $item-height + 2 * $padding (see Settings.scss) + 2 * border (see Settings.scss)
// where n is the number of displayed items in the menu
const sumHeight = [].reduce.call(menu.children, (sum, child) => sum + child.offsetHeight, 0);
this.settingsEl.style.height = `${sumHeight + 16}px`;
this.settingsEl.style.height = `${sumHeight + 18}px`;
}

/**
Expand Down