Skip to content

Commit

Permalink
Fixed blank row with table-layout: fixed. Fixes #53
Browse files Browse the repository at this point in the history
  • Loading branch information
NeXTs committed Jul 16, 2016
1 parent 11f7719 commit f4a9fd0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
6 changes: 4 additions & 2 deletions clusterize.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Clusterize.js - v0.16.0 - 2016-03-12
/*! Clusterize.js - v0.16.1 - 2016-08-16
* http://NeXTs.github.com/Clusterize.js/
* Copyright (c) 2015 Denis Lukov; Licensed GPLv3 */

Expand Down Expand Up @@ -188,7 +188,7 @@
opts.item_height = nodes[Math.floor(nodes.length / 2)].offsetHeight;
// consider table's border-spacing
if(opts.tag == 'tr' && getStyle('borderCollapse', this.content_elem) != 'collapse')
opts.item_height += parseInt(getStyle('borderSpacing', this.content_elem)) || 0;
opts.item_height += parseInt(getStyle('borderSpacing', this.content_elem), 10) || 0;
opts.block_height = opts.item_height * opts.rows_in_block;
opts.rows_in_cluster = opts.blocks_in_cluster * opts.rows_in_block;
opts.cluster_height = opts.blocks_in_cluster * opts.block_height;
Expand All @@ -208,6 +208,8 @@
empty_row.className = opts.no_data_class;
if(opts.tag == 'tr') {
td = document.createElement('td');
// fixes #53
td.colSpan = 100;
td.appendChild(no_data_content);
}
empty_row.appendChild(td || no_data_content);
Expand Down
8 changes: 4 additions & 4 deletions clusterize.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clusterize.js",
"version": "0.16.0",
"version": "0.16.1",
"description": "Tiny vanilla JS plugin to display large data sets easily",
"main": "clusterize.js",
"style": "clusterize.css",
Expand Down

0 comments on commit f4a9fd0

Please sign in to comment.