You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Chrome doesn't alter the scrollLeft value. So with RTL on a 400px-wide grid, the right-most position will still be 400 and the left-most will still be 0;
// Subtract the current scroll amount from the max scroll
748
+
returnmaxScrollLeft-scrollLeft;
749
+
}
750
+
else{
751
+
returnscrollLeft;
752
+
}
753
+
}
754
+
// Firefox goes negative!
755
+
elseif(browser==='firefox'){
756
+
returnMath.abs(scrollLeft);
757
+
}
758
+
else{
759
+
// TODO(c0bra): Handle other browsers? Android? iOS? Opera?
760
+
returnscrollLeft;
761
+
}
762
+
};
763
+
764
+
/**
765
+
* @ngdoc method
766
+
* @name normalizeScrollLeft
767
+
* @methodOf ui.grid.service:GridUtil
768
+
*
769
+
* @param {element} element The element to normalize the `scrollLeft` value for
770
+
* @param {int} scrollLeft The `scrollLeft` value to denormalize.
771
+
*
772
+
* @returns {int} A normalized scrollLeft value for the current browser.
773
+
*
774
+
* @description
775
+
* Browsers currently handle RTL in different ways, resulting in inconsistent scrollLeft values. This method denormalizes a value for the current browser.
// Chrome doesn't alter the scrollLeft value. So with RTL on a 400px-wide grid, the right-most position will still be 400 and the left-most will still be 0;
0 commit comments