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

Horizontal gallery styles fix #1261

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -997,10 +997,7 @@ class SlideshowView extends React.Component {
}
getStyles() {
return {
margin:
-1 *
(this.props.options.layoutParams_structure_itemSpacing / 2 -
this.props.options.layoutParams_structure_gallerySpacing),
overflow: 'hidden',
width: this.props.container.width,
height: this.props.container.height,
};
Expand Down
6 changes: 0 additions & 6 deletions packages/gallery/src/components/item/itemView.js
Original file line number Diff line number Diff line change
Expand Up @@ -638,22 +638,16 @@ class ItemView extends React.Component {

getItemContainerStyles() {
const { idx, activeIndex, offset, style, options, settings = {} } = this.props;
const itemSpacing = options[optionsMap.layoutParams.structure.itemSpacing];
const slideAnimation = options[optionsMap.behaviourParams.gallery.horizontal.slideAnimation];
const isRTL =
options[optionsMap.behaviourParams.gallery.layoutDirection] ===
GALLERY_CONSTS[optionsMap.behaviourParams.gallery.layoutDirection].RIGHT_TO_LEFT;
const scrollDirection = options[optionsMap.layoutParams.structure.scrollDirection];
const containerStyleByoptions = getContainerStyle(options);

const itemStyles = {
overflowY: 'hidden',
position: 'absolute',
bottom: 'auto',
margin:
scrollDirection === GALLERY_CONSTS[optionsMap.layoutParams.structure.scrollDirection].HORIZONTAL
? itemSpacing / 2 + 'px'
: 0,
};

const { avoidInlineStyles } = settings;
Expand Down
Loading