MCPcopy Index your code
hub / github.com/microsoft/SandDance / parseTrigger

Function parseTrigger

docs/app/js/sanddance-app.js:148339–148351  ·  view source on GitHub ↗
(spec, scope, name)

Source from the content-addressed store, hash-verified

148337 };
148338}
148339function parseTrigger(spec, scope, name) {
148340 const remove = spec.remove, insert = spec.insert, toggle = spec.toggle, modify = spec.modify, values = spec.values, op = scope.add(operator());
148341 const update = "if(" + spec.trigger + ',modify("' + name + '",' + [
148342 insert,
148343 remove,
148344 toggle,
148345 modify,
148346 values
148347 ].map((_)=>_ == null ? "null" : _).join(",") + "),0)";
148348 const expr5 = (0, _vegaFunctions.parseExpression)(update, scope);
148349 op.update = expr5.$expr;
148350 op.params = expr5.$params;
148351}
148352function parseMark(spec, scope) {
148353 const role = getRole(spec), group = spec.type === GroupMark, facet = spec.from && spec.from.facet, overlap = spec.overlap;
148354 let layout = spec.layout || role === ScopeRole || role === FrameRole, ops, op, store, enc, name, layoutRef, boundRef;

Callers 2

parseMarkFunction · 0.70
parseDataFunction · 0.70

Calls 2

operatorFunction · 0.70
addMethod · 0.45

Tested by

no test coverage detected