Skip to content

Commit

Permalink
fix: Slideshow sets min-height instead of height
Browse files Browse the repository at this point in the history
  • Loading branch information
janschoenherr committed Sep 20, 2018
1 parent 1d41086 commit 894b245
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -21,6 +21,7 @@
- Fix issue with list bullet in combination with multi column layouts
- Allow for special characters in URI hash in Scroll Component
- Height Match also sets a `height` in IE
- Slideshow sets `min-height` instead of `height`

## 3.0.0 rc 16 (September 12, 2018)

Expand Down
10 changes: 5 additions & 5 deletions src/js/components/slideshow.js
Expand Up @@ -2,7 +2,7 @@ import Class from '../mixin/class';
import Slideshow from '../mixin/slideshow';
import Animations from './internal/slideshow-animations';
import SliderReactive from '../mixin/slider-reactive';
import {height} from 'uikit-util';
import {boxModelAdjust, css} from 'uikit-util';

export default {

Expand Down Expand Up @@ -30,7 +30,7 @@ export default {

let [width, height] = this.ratio.split(':').map(Number);

height = height * this.$el.offsetWidth / width;
height = height * this.list.offsetWidth / width;

if (this.minHeight) {
height = Math.max(this.minHeight, height);
Expand All @@ -40,11 +40,11 @@ export default {
height = Math.min(this.maxHeight, height);
}

return {height};
return {height: height - boxModelAdjust(this.list, 'content-box')};
},

write({height: hgt}) {
height(this.list, Math.floor(hgt));
write({height}) {
css(this.list, 'minHeight', height);
},

events: ['load', 'resize']
Expand Down

0 comments on commit 894b245

Please sign in to comment.