Scroller 1.2.0

DataTables CDN files for Scroller 1.2.0. This software was originally released on 29th January, 2014.

Release notes

This release of Scroller sees the additional of the ability to show millions of rows in the DataTables view port, fully compatibility with DataTables 1.10 and harmonisation with the other extensions for DataTables in terms of file naming conventions, etc.

The major new feature of the ability to show any number of rows in a table is required for tables with a large record count as browser scrolling view ports are finite in size. To address this Scroller can 'reuse' parts of the scrolling container, although to the end user the scrolling will appear linear.

New features

  • New: License updated to MIT license
  • New: Full integration with DataTables 1.10
  • New: Ability to display any number of rows - not limited by browser maximum element height. This work was kindly sponsored by curts.
    • Browsers have a maximum height for CSS elements - it varies by browsers, but 2^32 is common. The upshot is that Scroller, as it was, cannot display large number of rows (millions) since it was assuming a completely infinite scrolling block. This commit works around this limitation in browsers.
    • The way this has been implemented is to have Scroller switch into a "domain transfer" mode where the position of the table for each draw position is calculated as a scaled proportion of the "virtual" to "physical" table heights. In Scroller the term "virtual" refers to the pixel positions if browsers did allow infinitely height scrolling blocks for each calculations, and "physical" is the scaled down sizes.
    • If the table height is < 1 million pixels, this new mode is not used, the old method is used (although through the new code).
    • When in the virtual mode, the scroll bar is non-linear (quadratic). This is to ease the start and end of the table, where otherwise the table redraw boundaries could cause the browser to get stuck (just a few pixels can be hundreds of rows for example).
  • New: Example with server-side processing showing 5 million rows
  • New: bower support for Scroller under the name datatables-scroller
  • New: AMD loader support - Scroller is now available under the named module datatables-scroller
  • New: Add warning that pagination must be enabled in DataTables when it is found to not be.
  • New: When the window is resized, the information element is updated on-the-fly to reflect the number of elements that can be seen in the scrolling viewport.

Updates

  • Update - performance: In the draw callback, read the sizing information in a single 'shot' rather than after invalidating the layout - 12944

Fixes

  • Fix: Save iScroller to saved scroll position on initialization - thanks to khirakawa for this fix.
  • Fix: On table destroy, remove absolute positioning
  • Fix: When destroying the DataTable, remove the event handlers that Scroller has added
  • Fix: DataTables 1.10 compatibility - when state saving check for Ajax source form the new ajax property as well
  • Fix: If :first-child or :last-child is used on the TR elements in the table's body, as is done in the new stylesheet for DataTables 1.10, the row height calculated might be wrong.
  • Fix: The automatic row height calculation was assuming that there would be only text in the table, which is not a valid assuption. Instead, take the first row from the table as what we will use to calculate the height.

Files

js

css

images