MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / diffData

Function diffData

libs/echarts/echarts-en.simple.js:34101–34117  ·  view source on GitHub ↗
(oldData, newData)

Source from the content-addressed store, hash-verified

34099// }
34100
34101function diffData(oldData, newData) {
34102 var diffResult = [];
34103
34104 newData.diff(oldData)
34105 .add(function (idx) {
34106 diffResult.push({cmd: '+', idx: idx});
34107 })
34108 .update(function (newIdx, oldIdx) {
34109 diffResult.push({cmd: '=', idx: oldIdx, idx1: newIdx});
34110 })
34111 .remove(function (idx) {
34112 diffResult.push({cmd: '-', idx: idx});
34113 })
34114 .execute();
34115
34116 return diffResult;
34117}
34118
34119var lineAnimationDiff = function (
34120 oldData, newData,

Callers 1

lineAnimationDiffFunction · 0.70

Calls 5

pushMethod · 0.80
executeMethod · 0.45
removeMethod · 0.45
updateMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected