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

Function updateClipping

docs/app/js/sanddance-app.js:124391–124409  ·  view source on GitHub ↗
(el, clip3, index)

Source from the content-addressed store, hash-verified

124389 return index;
124390} // update clipping path definitions
124391function updateClipping(el, clip3, index) {
124392 let mask;
124393 el = domChild(el, index, "clipPath", svgns);
124394 el.setAttribute("id", clip3.id);
124395 if (clip3.path) {
124396 mask = domChild(el, 0, "path", svgns);
124397 mask.setAttribute("d", clip3.path);
124398 } else {
124399 mask = domChild(el, 0, "rect", svgns);
124400 setAttributes(mask, {
124401 x: 0,
124402 y: 0,
124403 width: clip3.width,
124404 height: clip3.height
124405 });
124406 }
124407 domClear(el, 1);
124408 return index + 1;
124409} // Recursively process group contents.
124410function recurse(renderer, el, group8) {
124411 el = el.lastChild.previousSibling;
124412 let prev, idx = 0;

Callers 1

defsFunction · 0.70

Calls 3

domChildFunction · 0.70
setAttributesFunction · 0.70
domClearFunction · 0.70

Tested by

no test coverage detected