4xx / svg-edit

Automatically exported from code.google.com/p/svg-edit
MIT License
0 stars 0 forks source link

updateClipPath only update first child #1175

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
updateClipPath update the first element of clipPath.
it should update all elements in clipPath such as

var updateClipPath = function (attr, tx, ty) {
    var path = getRefElem(attr).firstChild;

    while (path != null) {
        var cp_xform = getTransformList(path);

        var newxlate = svgroot.createSVGTransform();
        newxlate.setTranslate(tx, ty);

        cp_xform.appendItem(newxlate);

        // Update clipPath's dimensions
        recalculateDimensions(path);

        path = path.nextSibling;
    }
}

Original issue reported on code.google.com by psh....@gmail.com on 25 Jan 2014 at 6:33