Skip to content

Commit

Permalink
Fix code review issues
Browse files Browse the repository at this point in the history
  • Loading branch information
texodus committed Mar 9, 2020
1 parent ea3f0d9 commit 90fa809
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
10 changes: 5 additions & 5 deletions packages/perspective-viewer-datagrid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@finos/perspective-viewer-datagrid",
"version": "0.4.3",
"version": "0.4.4",
"description": "Perspective.js",
"main": "dist/cjs/perspective-viewer-datagrid.js",
"module": "dist/cjs/perspective-viewer-datagrid.js",
Expand Down Expand Up @@ -35,13 +35,13 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"@finos/perspective": "^0.4.2",
"@finos/perspective-viewer": "^0.4.3",
"@finos/perspective": "^0.4.4",
"@finos/perspective-viewer": "^0.4.4",
"core-js": "^3.6.4",
"superscript-number": "^1.0.0"
},
"devDependencies": {
"@finos/perspective-test": "^0.4.3",
"@finos/perspective-webpack-plugin": "^0.4.1"
"@finos/perspective-test": "^0.4.4",
"@finos/perspective-webpack-plugin": "^0.4.4"
}
}
5 changes: 2 additions & 3 deletions packages/perspective-viewer-datagrid/src/js/datagrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const DOUBLE_BUFFER_ROW = false;

// The largest size virtual <div> in (px) that Chrome can support without
// glitching.
const CHROME_FUCKUP_LIMIT = 10000000;
const BROWSER_MAX_HEIGHT = 10000000;

const PRIVATE = Symbol("Private Datagrid");

Expand Down Expand Up @@ -102,7 +102,6 @@ class ViewModel {
}

constructor(container, table) {
// super();
this._container = container;
this.table = table;
this.cells = [];
Expand Down Expand Up @@ -598,7 +597,7 @@ class DatagridVirtualTableViewModel extends HTMLElement {
const schemap = view.schema().catch(() => {});
const nrows = await nrowsp;
const {start_row, end_row} = this._calculate_row_range(container_height, nrows);
const virtual_panel_px_size = Math.min(CHROME_FUCKUP_LIMIT, (nrows + this.table_model.header.cells.length) * 19);
const virtual_panel_px_size = Math.min(BROWSER_MAX_HEIGHT, (nrows + this.table_model.header.cells.length) * 19);
this.virtual_panel.style.height = `${virtual_panel_px_size}px`;

if (nrows > 0) {
Expand Down

0 comments on commit 90fa809

Please sign in to comment.