fix(columnWidth): Compensate for scrollbar only if there is vertical scroll
This commit is contained in:
parent
7531e13d17
commit
a04a5a1d7c
@ -200,3 +200,7 @@ $.scrollbarWidth = function scrollbarWidth() {
|
|||||||
|
|
||||||
return scrollbarWidth;
|
return scrollbarWidth;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$.hasVerticalOverflow = function (element) {
|
||||||
|
return element.scrollHeight > element.offsetHeight + 10;
|
||||||
|
};
|
||||||
|
|||||||
@ -206,6 +206,8 @@ export default class Style {
|
|||||||
}
|
}
|
||||||
|
|
||||||
compensateScrollbarWidth() {
|
compensateScrollbarWidth() {
|
||||||
|
if (!$.hasVerticalOverflow(this.bodyScrollable)) return;
|
||||||
|
|
||||||
requestAnimationFrame(() => {
|
requestAnimationFrame(() => {
|
||||||
const scrollbarWidth = $.scrollbarWidth();
|
const scrollbarWidth = $.scrollbarWidth();
|
||||||
const lastCol = this.datamanager.getColumn(-1);
|
const lastCol = this.datamanager.getColumn(-1);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user