jekyll-zeta 0.7.2 → 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/heatmap.js +27 -7
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92e9c3d10127af0ab175e41aa41643467f0a73eac8027ae0f350f06c2ebd67ba
4
- data.tar.gz: 3e9fa286e582ad2ed5acbc0a3d7c40baa51a34211789626c208a04afa3ba3b80
3
+ metadata.gz: 355269c9bb3e0eb724d648b8841875bc45026fa10b6173a17236940fb225e2d0
4
+ data.tar.gz: 7960a7083bb100e9cb89c4517fa8a26a15f864f8d243a23291b36096034b0a17
5
5
  SHA512:
6
- metadata.gz: 860c508e7587807af43753eba3de599a51ef42acca73128c0460aa988260b34eb3c1a0b0e2d2fc3a13e73f9c301bd2c3e3b80292a670b5d366fe15e6948bd618
7
- data.tar.gz: 9ca90a4536c7c716eb5b43349106475d14d34678cd6bf6db757cfdf3f4d2eb9c7c3864f968b0f95b987eb9fb498a000c481e4217ca16e3af0c7d081d1bed34fd
6
+ metadata.gz: faa4c3db616777ece4b3b80097f0ea0bddf5d32d9157bb813d6f0f48ebc82db47f7ca651aa60fa4ee6766dde31ef6d730b37f010f646c5f4fbfe05f6a79750cd
7
+ data.tar.gz: e17428da2bb51de98dd6547c2cc1ff4b283d1dad835f784412f6dbb687136c102f0dbff78a46874d95dae0099958ad7c670da42758d1300db1184c16465a29cd
data/_includes/heatmap.js CHANGED
@@ -34,8 +34,29 @@ const DayCount = (ColumnsCount - 1) * RowCount + dateEnd.getDay() + 1;
34
34
  if (yearCfg[preYear]) {
35
35
  arr.push(getYearData(preYear ))
36
36
  }
37
- Promise.all(arr).then(d2=>{
38
- updateCell({...d2[0],...d2[1]});
37
+ Promise.all(arr).then(alldata=>{
38
+ let combineData = {};
39
+ let d1 = alldata[0];
40
+ let d2 = alldata[1];
41
+
42
+ for (const key in d1) {
43
+ if (Object.prototype.hasOwnProperty.call(d1, key)) {
44
+ const element = d1[key];
45
+ let keyNew = 'K1-' + key;
46
+ combineData[keyNew] = element
47
+ }
48
+ }
49
+
50
+ for (const key in d2) {
51
+ if (Object.prototype.hasOwnProperty.call(d2, key)) {
52
+ const element = d2[key];
53
+ let keyNew = 'K2-' + key;
54
+ combineData[keyNew] = element
55
+ }
56
+ }
57
+
58
+
59
+ updateCell(combineData);
39
60
  })
40
61
  })
41
62
 
@@ -53,6 +74,8 @@ const DayCount = (ColumnsCount - 1) * RowCount + dateEnd.getDay() + 1;
53
74
  function updateCell(data){
54
75
  if(!data)return
55
76
 
77
+ console.log(data)
78
+
56
79
  let daysEle = document.getElementById(dayEleId)
57
80
  let dayCells = daysEle.childNodes
58
81
 
@@ -173,7 +196,7 @@ const DayCount = (ColumnsCount - 1) * RowCount + dateEnd.getDay() + 1;
173
196
 
174
197
 
175
198
  function updateMultiDays(){
176
- let day = 6;
199
+ let day = 13;
177
200
  while (day -- ) {
178
201
  update1Day();
179
202
  }
@@ -183,10 +206,7 @@ const DayCount = (ColumnsCount - 1) * RowCount + dateEnd.getDay() + 1;
183
206
  }
184
207
 
185
208
  }
186
-
187
- setTimeout(() => {
188
- requestAnimationFrame(updateMultiDays)
189
- }, 200);
209
+ requestAnimationFrame(updateMultiDays)
190
210
 
191
211
  return
192
212
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-zeta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - vitock