File tree Expand file tree Collapse file tree 1 file changed +4
-27
lines changed
Expand file tree Collapse file tree 1 file changed +4
-27
lines changed Original file line number Diff line number Diff line change 11import type {
2- OutputItem , RendererContext
2+ OutputItem ,
3+ RendererContext
34} from 'vscode-notebook-renderer' ;
45import { OutputLoader } from './outputLoader' ;
6+ import './style.css' ;
57const aq = require ( 'arquero' ) ;
68const inputs = require ( '@observablehq/inputs' ) ;
7- import './style.css' ;
9+
810
911/**
1012 * Notebook cell output render info.
@@ -39,7 +41,6 @@ export function render(output: IRenderInfo) {
3941 layout : 'auto' ,
4042 width : 'auto' ,
4143 height : 360 ,
42- rows : lengthOf ( data )
4344 } ) ;
4445
4546 // add table to cell data output container
@@ -59,27 +60,3 @@ if (module.hot) {
5960 // TODO: dispose resources and save renderer state
6061 } ) ;
6162}
62-
63- /**
64- * Gets data length.
65- * @param data Data array, set, map, or arquero table.
66- * @returns Dataset length/size or row count.
67- */
68- function lengthOf ( data : any ) {
69- if ( typeof data . length === 'number' ) {
70- // array or array-like
71- return data . length ;
72- }
73-
74- if ( typeof data . size === 'number' ) {
75- // map or set
76- return data . size ;
77- }
78-
79- if ( typeof data . numRows === 'function' ) {
80- // arquero
81- return data . numRows ( ) ;
82- }
83-
84- return 0 ;
85- }
You can’t perform that action at this time.
0 commit comments