The scrollWidth property always rounds up to an integer.
There are some instances where $self.width() would be something like 1058.10 and $self.get(0).scrollWidth would round up to 1059, causing the condition to fail and so the scrollbar would appear when it shouldn't.
By rounding up $self.width() we avoid this error.
The scrollWidth property always rounds up to an integer. There are some instances where $self.width() would be something like 1058.10 and $self.get(0).scrollWidth would round up to 1059, causing the condition to fail and so the scrollbar would appear when it shouldn't. By rounding up $self.width() we avoid this error.