stickshift.js
function FixedDataTableRowBuffer(
rowsCount,
    /*number*/  defaultRowHeight,
    /*number*/ viewportHeight,
    /*?function*/ rowHeightGetter)
   {
    invariant(
      defaultRowHeight !== 0,
      "defaultRowHeight musn't be equal 0 in FixedDataTableRowBuffer"
    );

    this.$FixedDataTableRowBuffer_bufferSet = new IntegerBufferSet();
    this.$FixedDataTableRowBuffer_defaultRowHeight = defaultRowHeight;
    this.$FixedDataTableRowBuffer_viewportRowsBegin = 0;
    this.$FixedDataTableRowBuffer_viewportRowsEnd = 0;
    this.$FixedDataTableRowBuffer_maxVisibleRowCount = Math.ceil(viewportHeight / defaultRowHeight) + 1;
    this.$FixedDataTableRowBuffer_bufferRowsCount = clamp(
      MIN_BUFFER_ROWS,
      Math.floor(this.$FixedDataTableRowBuffer_maxVisibleRowCount/2),
      MAX_BUFFER_ROWS
    );
    this.$FixedDataTableRowBuffer_rowsCount = rowsCount;
    this.$FixedDataTableRowBuffer_rowHeightGetter = rowHeightGetter;
    this.$FixedDataTableRowBuffer_rows = [];
    this.$FixedDataTableRowBuffer_viewportHeight = viewportHeight;

    this.getRows = this.getRows.bind(this);
    this.getRowsWithUpdatedBuffer = this.getRowsWithUpdatedBuffer.bind(this);
  }
function FixedDataTableRowBuffer(
rowsCount,
    /*number*/  defaultRowHeight,
    /*number*/ viewportHeight,
    /*?function*/ rowHeightGetter)
   {
    invariant(
      defaultRowHeight !== 0,
      "defaultRowHeight musn't be equal 0 in FixedDataTableRowBuffer"
    );

    this.$FixedDataTableRowBuffer_bufferSet = new IntegerBufferSet();
    this.$FixedDataTableRowBuffer_defaultRowHeight = defaultRowHeight;
    this.$FixedDataTableRowBuffer_viewportRowsBegin = 0;
    this.$FixedDataTableRowBuffer_viewportRowsEnd = 0;
    this.$FixedDataTableRowBuffer_maxVisibleRowCount = Math.ceil(viewportHeight / defaultRowHeight) + 1;
    this.$FixedDataTableRowBuffer_bufferRowsCount = clamp(
      MIN_BUFFER_ROWS,
      Math.floor(this.$FixedDataTableRowBuffer_maxVisibleRowCount/2),
      MAX_BUFFER_ROWS
    );
    this.$FixedDataTableRowBuffer_rowsCount = rowsCount;
    this.$FixedDataTableRowBuffer_rowHeightGetter = rowHeightGetter;
    this.$FixedDataTableRowBuffer_rows = [];
    this.$FixedDataTableRowBuffer_viewportHeight = viewportHeight;

    this.getRows = this.getRows.bind(this);
    this.getRowsWithUpdatedBuffer = this.getRowsWithUpdatedBuffer.bind(this);
  }
function FixedDataTableRowBuffer ( rowsCount , /*number*/ defaultRowHeight , /*number*/ viewportHeight , /*?function*/ rowHeightGetter ) { invariant ( defaultRowHeight !== 0 , "defaultRowHeight musn't be equal 0 in FixedDataTableRowBuffer" ) ; this . $FixedDataTableRowBuffer_bufferSet = new IntegerBufferSet ( ) ; this . $FixedDataTableRowBuffer_defaultRowHeight = defaultRowHeight ; this . $FixedDataTableRowBuffer_viewportRowsBegin = 0 ; this . $FixedDataTableRowBuffer_viewportRowsEnd = 0 ; this . $FixedDataTableRowBuffer_maxVisibleRowCount = Math . ceil ( viewportHeight / defaultRowHeight ) + 1 ; this . $FixedDataTableRowBuffer_bufferRowsCount = clamp ( MIN_BUFFER_ROWS , Math . floor ( this . $FixedDataTableRowBuffer_maxVisibleRowCount / 2 ) , MAX_BUFFER_ROWS ) ; this . $FixedDataTableRowBuffer_rowsCount = rowsCount ; this . $FixedDataTableRowBuffer_rowHeightGetter = rowHeightGetter ; this . $FixedDataTableRowBuffer_rows = [ ] ; this . $FixedDataTableRowBuffer_viewportHeight = viewportHeight ; this . getRows = this . getRows . bind ( this ) ; this . getRowsWithUpdatedBuffer = this . getRowsWithUpdatedBuffer . bind ( this ) ; }
FixedDataTableRowBuffer is a helper class that executes row buffering logic for FixedDataTable. It figures out which rows should be rendered and in which positions.
FixedDataTableRowBuffer is a helper class that executes row buffering logic for FixedDataTable . It figures out which rows should be rendered and in which positions .