Fixed #1473 - Alignment issue with multiple frozen columns on DataTable

pull/1533/head
mertsincan 2021-08-31 12:33:15 +03:00
parent 132f91f7aa
commit f12f8e73a6
2 changed files with 4 additions and 4 deletions

View File

@ -312,7 +312,7 @@ export default {
let right = 0; let right = 0;
let next = this.$el.nextElementSibling; let next = this.$el.nextElementSibling;
if (next) { if (next) {
right = DomHandler.getOuterWidth(next) + parseFloat(next.style.left); right = DomHandler.getOuterWidth(next) + parseFloat(next.style.right || 0);
} }
this.styleObject.right = right + 'px'; this.styleObject.right = right + 'px';
} }
@ -320,7 +320,7 @@ export default {
let left = 0; let left = 0;
let prev = this.$el.previousElementSibling; let prev = this.$el.previousElementSibling;
if (prev) { if (prev) {
left = DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left); left = DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left || 0);
} }
this.styleObject.left = left + 'px'; this.styleObject.left = left + 'px';
} }

View File

@ -156,7 +156,7 @@ export default {
let right = 0; let right = 0;
let next = this.$el.nextElementSibling; let next = this.$el.nextElementSibling;
if (next) { if (next) {
right = DomHandler.getOuterWidth(next) + parseFloat(next.style.right); right = DomHandler.getOuterWidth(next) + parseFloat(next.style.right || 0);
} }
this.styleObject.right = right + 'px'; this.styleObject.right = right + 'px';
} }
@ -164,7 +164,7 @@ export default {
let left = 0; let left = 0;
let prev = this.$el.previousElementSibling; let prev = this.$el.previousElementSibling;
if (prev) { if (prev) {
left = DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left); left = DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left || 0);
} }
this.styleObject.left = left + 'px'; this.styleObject.left = left + 'px';
} }