How to update all the strokes on the canvas in JSFL?

83 views Asked by At

I am looking for a way to update the widths of all the strokes on the canvas.

document.selectAll();
document.selection.forEach(function(el) {
    if (el instanceof Shape) {
        el.beginEdit();
        el.edges.forEach(function(edge) {
            edge.stroke.thickness = edge.stroke.thickness * 2;
        });
        el.endEdit();
    }
});

This throws exceptions. In addition, there is no edge.setCustomStroke (that only exists for Shape objects, but I don't want to set the same stroke with for the entire selection of the canvas).

0

There are 0 answers