Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

datatables.net-scroller

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

datatables.net-scroller - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

74

js/dataTables.scroller.js

@@ -1,3 +0,3 @@

/*! Scroller 1.4.0
* ©2011-2015 SpryMedia Ltd - datatables.net/license
/*! Scroller 1.4.1
* ©2011-2016 SpryMedia Ltd - datatables.net/license
*/

@@ -8,7 +8,7 @@

* @description Virtual rendering for DataTables
* @version 1.4.0
* @version 1.4.1
* @file dataTables.scroller.js
* @author SpryMedia Ltd (www.sprymedia.co.uk)
* @contact www.sprymedia.co.uk/contact
* @copyright Copyright 2011-2015 SpryMedia Ltd.
* @copyright Copyright 2011-2016 SpryMedia Ltd.
*

@@ -435,5 +435,7 @@ * This source file is free software, available under the following license:

heights.viewport = $(this.dom.scroller).height();
this.s.viewportRows = parseInt( heights.viewport / heights.row, 10 )+1;
this.s.dt._iDisplayLength = this.s.viewportRows * this.s.displayBuffer;
if ( heights.row ) {
heights.viewport = $(this.dom.scroller).height();
this.s.viewportRows = parseInt( heights.viewport / heights.row, 10 )+1;
this.s.dt._iDisplayLength = this.s.viewportRows * this.s.displayBuffer;
}

@@ -447,3 +449,27 @@ if ( bRedraw === undefined || bRedraw )

/**
* Get information about current displayed record range. This corresponds to
* the information usually displayed in the "Info" block of the table.
*
* @returns {object} info as an object:
* {
* start: {int}, // the 0-indexed record at the top of the viewport
* end: {int}, // the 0-indexed record at the bottom of the viewport
* }
*/
"fnPageInfo": function()
{
var
dt = this.s.dt,
iScrollTop = this.dom.scroller.scrollTop,
iTotal = dt.fnRecordsDisplay(),
iPossibleEnd = Math.ceil(this.fnPixelsToRow(iScrollTop + this.s.heights.viewport, false, this.s.ani));
return {
start: Math.floor(this.fnPixelsToRow(iScrollTop, false, this.s.ani)),
end: iTotal < iPossibleEnd ? iTotal-1 : iPossibleEnd-1
};
},
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

@@ -562,3 +588,7 @@ * Private methods (they are of course public in JS, but recommended as private)

$(this.s.dt.nTable).on( 'init.dt', function () {
// Measure immediately. Scroller will have been added using preInit, so
// we can reliably do this here. We could potentially also measure on
// init complete, which would be useful for cases where the data is Ajax
// loaded and longer than a single line.
$(this.s.dt.nTable).one( 'init.dt', function () {
that.fnMeasure();

@@ -861,6 +891,8 @@ } );

// take precedence over the one we want here. So a 'thread' break is
// needed
setTimeout( function () {
that._fnInfo.call( that );
}, 0 );
// needed. Only add the thread break if bInfo is set
if ( this.s.dt.oFeatures.bInfo ) {
setTimeout( function () {
that._fnInfo.call( that );
}, 0 );
}

@@ -938,3 +970,9 @@ // Hide the loading indicator

// If initialised using `dom`, use the holding element as the insert point
container.appendTo( this.s.dt.nHolding || origTable.parentNode );
var insertEl = this.s.dt.nHolding || origTable.parentNode;
if ( ! $(insertEl).is(':visible') ) {
insertEl = 'body';
}
container.appendTo( insertEl );
this.s.heights.row = $('tr', tbody).eq(1).outerHeight();

@@ -1182,3 +1220,3 @@

*/
Scroller.version = "1.4.0";
Scroller.version = "1.4.1";

@@ -1302,4 +1340,12 @@

Api.register( 'scroller.page()', function() {
var ctx = this.context;
if ( ctx.length && ctx[0].oScroller ) {
return ctx[0].oScroller.fnPageInfo();
}
// undefined
} );
return Scroller;
}));

2

package.json
{
"name": "datatables.net-scroller",
"version": "1.4.0",
"version": "1.4.1",
"description": "Scroller for DataTables ",

@@ -5,0 +5,0 @@ "files": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc