MCPcopy Create free account
hub / github.com/microsoft/SandDance / _update

Function _update

docs/app/js/sanddance-app.js:124280–124291  ·  view source on GitHub ↗

* Update the attributes of an SVG element for a mark item. * @param {object} mdef - The mark definition object * @param {SVGElement} el - The SVG element. * @param {Item} item - The mark item.

(mdef, el, item)

Source from the content-addressed store, hash-verified

124278 * @param {SVGElement} el - The SVG element.
124279 * @param {Item} item - The mark item.
124280 */ _update (mdef, el, item) {
124281 // set dom element and values cache
124282 // provides access to emit method
124283 element = el;
124284 values = el.__values__; // apply aria-specific properties
124285 ariaItemAttributes(emit, item); // apply svg attributes
124286 mdef.attr(emit, item, this); // some marks need special treatment
124287 const extra = mark_extras[mdef.type];
124288 if (extra) extra.call(this, mdef, el, item); // apply svg style attributes
124289 // note: element state may have been modified by 'extra' method
124290 if (element) this.style(element, item);
124291 },
124292 /**
124293 * Update the presentation attributes of an SVG element for a mark item.
124294 * @param {SVGElement} el - The SVG element.

Callers

nothing calls this directly

Calls 1

ariaItemAttributesFunction · 0.70

Tested by

no test coverage detected