@@ -15,7 +15,13 @@ import {
15
15
ViewChild
16
16
} from '@angular/core' ;
17
17
import { ActivatedRoute , ParamMap } from '@angular/router' ;
18
- import { isEqualIgnoreFunctions , NavigationService , NumberCoercer , TypedSimpleChanges } from '@hypertrace/common' ;
18
+ import {
19
+ DomElementMeasurerService ,
20
+ isEqualIgnoreFunctions ,
21
+ NavigationService ,
22
+ NumberCoercer ,
23
+ TypedSimpleChanges
24
+ } from '@hypertrace/common' ;
19
25
import { without } from 'lodash-es' ;
20
26
import { BehaviorSubject , combineLatest , Observable } from 'rxjs' ;
21
27
import { filter , map } from 'rxjs/operators' ;
@@ -336,6 +342,7 @@ export class TableComponent
336
342
private readonly changeDetector : ChangeDetectorRef ,
337
343
private readonly navigationService : NavigationService ,
338
344
private readonly activatedRoute : ActivatedRoute ,
345
+ private readonly domElementMeasurerService : DomElementMeasurerService ,
339
346
private readonly tableService : TableService
340
347
) {
341
348
combineLatest ( [ this . activatedRoute . queryParamMap , this . columnConfigs$ ] )
@@ -437,15 +444,15 @@ export class TableComponent
437
444
438
445
private buildColumnInfo ( index : number ) : ColumnInfo {
439
446
const element = this . queryHeaderCellElement ( index ) ;
440
- const boundingBox = element . getBoundingClientRect ( ) ;
447
+ const boundingBox = this . domElementMeasurerService . measureHtmlElement ( element ) ;
441
448
442
449
return {
443
450
config : this . getVisibleColumnConfig ( index ) ,
444
451
element : element ,
445
452
bounds : {
446
453
// We add additional padding so a portion of the column remains visible to resize (asymmetry due to resize-handle)
447
- left : boundingBox . x + 12 ,
448
- right : boundingBox . x + boundingBox . width - 8
454
+ left : boundingBox . left + 12 ,
455
+ right : boundingBox . left + boundingBox . width - 8
449
456
}
450
457
} ;
451
458
}
0 commit comments