Skip to content

Commit

Permalink
fix(sliderView): find width properly when element is transformed
Browse files Browse the repository at this point in the history
Fixes #1313
  • Loading branch information
ajoslin committed Jun 24, 2014
1 parent 5433d3f commit 86ce480
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/views/sliderView.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ionic.views.Slider = ionic.views.View.inherit({
slidePos = new Array(slides.length);

// determine width of each slide
width = container.getBoundingClientRect().width || container.offsetWidth;
width = container.offsetWidth || container.getBoundClientRect().width;

element.style.width = (slides.length * width) + 'px';

Expand Down

1 comment on commit 86ce480

@mlynch
Copy link
Contributor

@mlynch mlynch commented on 86ce480 Jul 3, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @ajoslin can you take another look at this and the PR here: #1722. I think getBoundClientRect is incorrect.

Please sign in to comment.