Skip to content

Commit 2ac1228

Browse files
committed
fix(resizing): no taking into account bellow a pixel
1 parent f4002c2 commit 2ac1228

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

projects/igniteui-angular/src/lib/grids/resizing/resizer.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export class IgxColumnResizerDirective implements OnInit, OnDestroy {
120120
const parent = this.element.nativeElement.parentElement.parentElement;
121121
const parentRectWidth = parent.getBoundingClientRect().width;
122122
const parentComputedWidth = parseFloat(window.getComputedStyle(parent).width);
123-
if (parentRectWidth && parentComputedWidth && parentRectWidth / parentComputedWidth !== 1) {
123+
if (Math.abs(parentRectWidth - parentComputedWidth) > 1) {
124124
this._ratio = parentRectWidth / parentComputedWidth;
125125
}
126126
this.left = this._left = (event.clientX - parent.getBoundingClientRect().left) / this._ratio;

0 commit comments

Comments
 (0)