Skip to content

Commit 8bcdcb8

Browse files
authored
Merge pull request #469 from Josh-ES/fix-issue-465
Fixed #465.
2 parents 2c22fe3 + aeac851 commit 8bcdcb8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/mixins/helpers.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ var helpers = {
1515
var slideWidth;
1616

1717
if (!props.vertical) {
18-
slideWidth = trackWidth/props.slidesToShow;
18+
slideWidth = this.getWidth(ReactDOM.findDOMNode(this))/props.slidesToShow;
1919
} else {
20-
slideWidth = trackWidth;
20+
slideWidth = this.getWidth(ReactDOM.findDOMNode(this));
2121
}
2222

2323
const slideHeight = this.getHeight(slickList.querySelector('[data-index="0"]'));
@@ -57,9 +57,9 @@ var helpers = {
5757
var slideWidth;
5858

5959
if (!props.vertical) {
60-
slideWidth = trackWidth/props.slidesToShow;
60+
slideWidth = this.getWidth(ReactDOM.findDOMNode(this))/props.slidesToShow;
6161
} else {
62-
slideWidth = trackWidth;
62+
slideWidth = this.getWidth(ReactDOM.findDOMNode(this));
6363
}
6464

6565
const slideHeight = this.getHeight(slickList.querySelector('[data-index="0"]'));

0 commit comments

Comments
 (0)