ag-timemachine
Advanced tools
Comparing version 1.0.72 to 1.0.73
{ | ||
"name": "ag-timemachine", | ||
"version": "1.0.72", | ||
"version": "1.0.73", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -90,3 +90,2 @@ "use strict"; | ||
this.deltaWatcher = (0, AgVueWrap_1.watch)(this.recentDatasRaw, function (v) { | ||
var _a; | ||
var start = new Date(); | ||
@@ -105,14 +104,16 @@ var datas = _this.recentDatas.value; | ||
} | ||
while (deltas.length > 0 && !deltas[0].snapshot) | ||
deltas.shift(); | ||
if (deltas.length > 0) { | ||
var first = deltas[0]; | ||
datas.push({ time: first.time, value: (_a = first.snapshot) === null || _a === void 0 ? void 0 : _a.value }); | ||
for (var i = 1; i < deltas.length; i++) { | ||
var cur = deltas[i]; | ||
for (var _i = 0, deltas_1 = deltas; _i < deltas_1.length; _i++) { | ||
var cur = deltas_1[_i]; | ||
if (cur.snapshot) { | ||
datas.push({ | ||
time: cur.time, | ||
value: cur.snapshot ? cur.snapshot.value : (0, AgLodashWrap_1.cloneDeep)(AgDiff_1.AgDiff.patch(datas[datas.length - 1].value, cur.delta)) | ||
value: cur.snapshot.value | ||
}); | ||
} | ||
else if (datas.length > 0) { | ||
datas.push({ | ||
time: cur.time, | ||
value: (0, AgLodashWrap_1.cloneDeep)(AgDiff_1.AgDiff.patch(datas[datas.length - 1].value, cur.delta)) | ||
}); | ||
} | ||
} | ||
@@ -119,0 +120,0 @@ console.log('compute recent datas', new Date().getTime() - start.getTime()); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1525
69369