aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DataVizBox/components/TableBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-12-07 15:33:57 -0500
committerbobzel <zzzman@gmail.com>2023-12-07 15:33:57 -0500
commit0adf05851b86b54b4414cad28b2975f533e45b9f (patch)
tree4ac9b31c4fca187493bf8e1c6abd106b1d50006d /src/client/views/nodes/DataVizBox/components/TableBox.tsx
parent0d4c4ba17f90cf80403e6c65d2402125537cbd6b (diff)
fixed table boxes and label boxes.
Diffstat (limited to 'src/client/views/nodes/DataVizBox/components/TableBox.tsx')
-rw-r--r--src/client/views/nodes/DataVizBox/components/TableBox.tsx8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client/views/nodes/DataVizBox/components/TableBox.tsx b/src/client/views/nodes/DataVizBox/components/TableBox.tsx
index d422a7536..0e766e5f0 100644
--- a/src/client/views/nodes/DataVizBox/components/TableBox.tsx
+++ b/src/client/views/nodes/DataVizBox/components/TableBox.tsx
@@ -1,5 +1,5 @@
import { Button, Type } from 'browndash-components';
-import { action, computed, IReactionDisposer, observable, reaction } from 'mobx';
+import { action, computed, IReactionDisposer, observable, reaction, trace } from 'mobx';
import { observer } from 'mobx-react';
import * as React from 'react';
import { Doc, Field, NumListCast } from '../../../../../fields/Doc';
@@ -12,7 +12,7 @@ import { DocumentView } from '../../DocumentView';
import { DataVizView } from '../DataVizBox';
import './Chart.scss';
//import { DATA_VIZ_TABLE_ROW_HEIGHT } from '../../../global/globalCssVariables.scss';
-const DATA_VIZ_TABLE_ROW_HEIGHT = '30px';
+const DATA_VIZ_TABLE_ROW_HEIGHT = '30';
interface TableBoxProps {
Document: Doc;
@@ -80,12 +80,14 @@ export class TableBox extends React.Component<TableBoxProps> {
return this.props.docView?.()?.props.ScreenToLocalTransform().Scale || 1;
}
@computed get rowHeight() {
+ console.log('scale = ' + this.viewScale + ' table = ' + this._tableHeight + ' ids = ' + this._tableDataIds.length);
return (this.viewScale * this._tableHeight) / this._tableDataIds.length;
}
@computed get startID() {
return this.rowHeight ? Math.floor(this._scrollTop / this.rowHeight) : 0;
}
@computed get endID() {
+ console.log('start = ' + this.startID + ' container = ' + this._tableContainerHeight + ' scale = ' + this.viewScale + ' row = ' + this.rowHeight);
return Math.ceil(this.startID + (this._tableContainerHeight * this.viewScale) / (this.rowHeight || 1));
}
@action handleScroll = () => {
@@ -160,6 +162,8 @@ export class TableBox extends React.Component<TableBoxProps> {
};
render() {
+ console.log(this.endID);
+ trace();
if (this._tableData.length > 0) {
return (
<div