resize width of layer to canvas width
I'm having some trouble resizing a layer width to canvas width.
I know one way that works and it involves creating new document, resizing, then pasting back in. This seems extranious it seems there should be an easier way.
var width = doc.width;
var bounds = layer.bounds;
var height = bounds[3]-bounds[1]; \\get height because I want this the same
var width = doc.width;
layer.resize (width, height, AnchorPosition.MIDDLECENTER);
this seems to fail even though it seems the documentation says it should work? maybe I am misunderstanding.
