Skip to content

Commit

Permalink
Fixed rendering of similar markup. Closes #97
Browse files Browse the repository at this point in the history
  • Loading branch information
NeXTs committed Feb 19, 2017
1 parent d6b8206 commit 69931c7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
7 changes: 4 additions & 3 deletions clusterize.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Clusterize.js - v0.17.2 - 2016-10-07
/*! Clusterize.js - v0.17.3 - 2017-02-19
* http://NeXTs.github.com/Clusterize.js/
* Copyright (c) 2015 Denis Lukov; Licensed GPLv3 */

Expand Down Expand Up @@ -63,7 +63,7 @@
var rows = isArray(data.rows)
? data.rows
: self.fetchMarkup(),
cache = {data: '', bottom: 0},
cache = {data: '', top: 0, bottom: 0},
scroll_top = self.scroll_elem.scrollTop;

// append initial data
Expand Down Expand Up @@ -260,11 +260,12 @@
var data = this.generate(rows, this.getClusterNum()),
this_cluster_rows = data.rows.join(''),
this_cluster_content_changed = this.checkChanges('data', this_cluster_rows, cache),
top_offset_changed = this.checkChanges('bottom', data.top_offset, cache),
only_bottom_offset_changed = this.checkChanges('bottom', data.bottom_offset, cache),
callbacks = this.options.callbacks,
layout = [];

if(this_cluster_content_changed) {
if(this_cluster_content_changed || top_offset_changed) {
if(data.top_offset) {
this.options.keep_parity && layout.push(this.renderExtraTag('keep-parity'));
layout.push(this.renderExtraTag('top-space', data.top_offset));
Expand Down
22 changes: 11 additions & 11 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.17.2",
"version": "0.17.3",
"description": "Tiny vanilla JS plugin to display large data sets easily",
"main": "clusterize.js",
"style": "clusterize.css",
Expand Down

0 comments on commit 69931c7

Please sign in to comment.