Skip to content

Commit

Permalink
Use a more simple workaround for width calc rounding issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornharrtell committed Dec 30, 2016
1 parent 9d73ad5 commit 57ecb22
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addon/components/paper-tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ export default Component.extend(RippleMixin, ProxiableMixin, ColorMixin, {
let context = this;
if (context.$().length) {
let left = context.$()[0].offsetLeft + context.get('offsetLeft');
let width = parseFloat(window.getComputedStyle(context.$()[0]).getPropertyValue('width'));
// add a pixel to avoid truncation due to fractional rounding
let width = context.$()[0].offsetWidth + 1;
context.set('self.offsetLeft', left);
context.set('self.offsetWidth', width);
}
Expand Down

0 comments on commit 57ecb22

Please sign in to comment.