1 | import {Transform} from 'vega-dataflow';
|
2 | import {inherits} from 'vega-util';
|
3 |
|
4 | /**
|
5 | * Operator whose value is simply its parameter hash. This operator is
|
6 | * useful for enabling reactive updates to values of nested objects.
|
7 | * @constructor
|
8 | * @param {object} params - The parameters for this operator.
|
9 | */
|
10 | export default function Params(params) {
|
11 | Transform.call(this, null, params);
|
12 | }
|
13 |
|
14 | inherits(Params, Transform, {
|
15 | transform(_, pulse) {
|
16 | this.modified(_.modified());
|
17 | this.value = _;
|
18 | return pulse.fork(pulse.NO_SOURCE | pulse.NO_FIELDS); // do not pass tuples
|
19 | }
|
20 | });
|