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

Function defs

docs/app/js/sanddance-app.js:124314–124326  ·  view source on GitHub ↗

* Render SVG defs, as needed. * Must be called *after* marks have been processed to ensure the * collected state is current and accurate.

()

Source from the content-addressed store, hash-verified

124312 * Must be called *after* marks have been processed to ensure the
124313 * collected state is current and accurate.
124314 */ defs () {
124315 const svg = this._svg, defs = this._defs;
124316 let el = defs.el, index = 0;
124317 for(const id in defs.gradient){
124318 if (!el) defs.el = el = domChild(svg, RootIndex + 1, "defs", svgns);
124319 index = updateGradient(el, defs.gradient[id], index);
124320 }
124321 for(const id1 in defs.clipping){
124322 if (!el) defs.el = el = domChild(svg, RootIndex + 1, "defs", svgns);
124323 index = updateClipping(el, defs.clipping[id1], index);
124324 } // clean-up
124325 if (el) index === 0 ? (svg.removeChild(el), defs.el = null) : domClear(el, index);
124326 },
124327 /**
124328 * Clear defs caches.
124329 */ _clearDefs () {

Callers

nothing calls this directly

Calls 6

domChildFunction · 0.70
updateGradientFunction · 0.70
updateClippingFunction · 0.70
domClearFunction · 0.70
openMethod · 0.65
closeMethod · 0.65

Tested by

no test coverage detected