vega-dataflow
Advanced tools
Comparing version 1.3.0 to 1.3.1
{ | ||
"name": "vega-dataflow", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "Vega streaming dataflow graph.", | ||
@@ -5,0 +5,0 @@ "repository": { |
var log = require('vega-logging'), | ||
Tuple = require('./Tuple'), | ||
Base = require('./Node').prototype; | ||
Base = require('./Node').prototype, | ||
ChangeSet = require('./ChangeSet'); | ||
@@ -21,10 +22,20 @@ function Collector(graph) { | ||
// Create a new output changeset to prevent pollution when the Graph | ||
// merges reflow and regular changesets. | ||
var output = ChangeSet.create(input); | ||
if (input.rem.length) { | ||
this._data = Tuple.idFilter(this._data, input.rem); | ||
output.rem = input.rem.slice(0); | ||
} | ||
if (input.add.length) { | ||
this._data = this._data.length ? this._data.concat(input.add) : input.add; | ||
this._data = this._data.concat(input.add); | ||
output.add = input.add.slice(0); | ||
} | ||
if (input.mod.length) { | ||
output.mod = input.mod.slice(0); | ||
} | ||
if (input.sort) { | ||
@@ -35,10 +46,10 @@ this._data.sort(input.sort); | ||
if (input.reflow) { | ||
input.mod = input.mod.concat( | ||
Tuple.idFilter(this._data, input.add, input.mod, input.rem)); | ||
input.reflow = false; | ||
output.mod = output.mod.concat( | ||
Tuple.idFilter(this._data, output.add, output.mod, output.rem)); | ||
output.reflow = false; | ||
} | ||
return input; | ||
return output; | ||
}; | ||
module.exports = Collector; |
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
521671
7003