MCPcopy
hub / github.com/methodofaction/Method-Draw / updateClipPath

Function updateClipPath

src/js/svgcanvas.js:1218–1230  ·  view source on GitHub ↗
(attr, tx, ty)

Source from the content-addressed store, hash-verified

1216// tx - The translation's x value
1217// ty - The translation's y value
1218var updateClipPath = function(attr, tx, ty) {
1219 var path = getRefElem(attr).firstChild;
1220
1221 var cp_xform = getTransformList(path);
1222
1223 var newxlate = svgroot.createSVGTransform();
1224 newxlate.setTranslate(tx, ty);
1225
1226 cp_xform.appendItem(newxlate);
1227
1228 // Update clipPath's dimensions
1229 recalculateDimensions(path);
1230}
1231
1232// Function: recalculateDimensions
1233// Decides the course of action based on the element's transform list

Callers 1

svgcanvas.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected