A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pa7/heatmap.js/commit/85ba3526f1b943d8237970fae28353c8bb086a60 below:

Update build · pa7/heatmap.js@85ba352 · GitHub

File tree Expand file treeCollapse file tree 2 files changed

+22

-10

lines changed

Filter options

Expand file treeCollapse file tree 2 files changed

+22

-10

lines changed Original file line number Diff line number Diff line change

@@ -1,10 +1,10 @@

1 1

/*

2 -

* heatmap.js v2.0.2 | JavaScript Heatmap Library

2 +

* heatmap.js v2.0.5 | JavaScript Heatmap Library

3 3

*

4 4

* Copyright 2008-2016 Patrick Wied <heatmapjs@patrick-wied.at> - All rights reserved.

5 5

* Dual licensed under MIT and Beerware license

6 6

*

7 -

* :: 2016-02-04 21:25

7 +

* :: 2016-09-05 01:16

8 8

*/

9 9

;(function (name, context, factory) {

10 10

@@ -38,7 +38,7 @@ var Store = (function StoreClosure() {

38 38

this._coordinator = {};

39 39

this._data = [];

40 40

this._radi = [];

41 -

this._min = 0;

41 +

this._min = 10;

42 42

this._max = 1;

43 43

this._xField = config['xField'] || config.defaultXField;

44 44

this._yField = config['yField'] || config.defaultYField;

@@ -74,15 +74,23 @@ var Store = (function StoreClosure() {

74 74

} else {

75 75

store[x][y] += value;

76 76

}

77 +

var storedVal = store[x][y];

77 78 78 -

if (store[x][y] > max) {

79 +

if (storedVal > max) {

79 80

if (!forceRender) {

80 -

this._max = store[x][y];

81 +

this._max = storedVal;

81 82

} else {

82 -

this.setDataMax(store[x][y]);

83 +

this.setDataMax(storedVal);

83 84

}

84 85

return false;

85 -

} else{

86 +

} else if (storedVal < min) {

87 +

if (!forceRender) {

88 +

this._min = storedVal;

89 +

} else {

90 +

this.setDataMin(storedVal);

91 +

}

92 +

return false;

93 +

} else {

86 94

return {

87 95

x: x,

88 96

y: y,

@@ -133,6 +141,10 @@ var Store = (function StoreClosure() {

133 141

// add to store

134 142

var organisedEntry = this._organiseData(arguments[0], true);

135 143

if (organisedEntry) {

144 +

// if it's the first datapoint initialize the extremas with it

145 +

if (this._data.length === 0) {

146 +

this._min = this._max = organisedEntry.value;

147 +

}

136 148

this._coordinator.emit('renderpartial', {

137 149

min: this._min,

138 150

max: this._max,

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4