From f281edeb4d6c903a118ea965a95c46c2bcdf6a2f Mon Sep 17 00:00:00 2001 From: Mariusz Jurowicz Date: Mon, 9 Jul 2018 11:58:22 +0200 Subject: [PATCH] #7338 fix TableDisplay resize feature --- js/notebook/src/tableDisplay/dataGrid/DataGridResize.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/notebook/src/tableDisplay/dataGrid/DataGridResize.ts b/js/notebook/src/tableDisplay/dataGrid/DataGridResize.ts index 3ecb18e4ca..5eecda46ae 100644 --- a/js/notebook/src/tableDisplay/dataGrid/DataGridResize.ts +++ b/js/notebook/src/tableDisplay/dataGrid/DataGridResize.ts @@ -51,7 +51,7 @@ export class DataGridResize { this.handleMouseMove = this.handleMouseMove.bind(this); this.handleMouseUp = this.handleMouseUp.bind(this); this.fillEmptySpaceResizeFn = this.fillEmptySpaceResizeFn.bind(this); - this.fitVieport = throttle(this.fitVieport, 150, this); + this.fitVieport = throttle(this.fitVieport, 100, this); this.installMessageHook(); } @@ -96,7 +96,7 @@ export class DataGridResize { return; } - this.dataGrid.node.style.width = `${width + 1}px`; + this.dataGrid.node.style.width = `${width}px`; this.fitVieport(); } @@ -123,6 +123,8 @@ export class DataGridResize { this.dataGrid.columnSections['_sections'].forEach(this.fillEmptySpaceResizeFn('body', value)); this.dataGrid.rowHeaderSections['_sections'].forEach(this.fillEmptySpaceResizeFn('row-header', value)); + + this.fitVieport(); } updateColumnWidth(region: ColumnRegion): Function { @@ -151,7 +153,6 @@ export class DataGridResize { stopResizing() { this.resizing = false; - this.resizeMode = null; this.dataGrid.node.parentElement.removeEventListener('mouseup', this.handleMouseUp, true); document.body.removeEventListener('mousemove', this.handleMouseMove, true);