How can I change the width/height of a selected path in SVG-edit.
So far i only have this:
svgCanvas.changeSelectedAttribute("height", "499");
The above command has absolutely no effect on the path. Resizing the bounding box just resizes the bounding box, but not the path itself.
To do this, go up in the Options Bar and turn on the checkbox for Show Bounding Box. This puts a Free Transform-like bounding box around your path, and you can use this bounding box to resize your path by dragging the handles (remember to hold the Shift key to resize it proportionately).
Although the SVG element does have height and width attributes, these might not be specified as pixels, but any of a number of units, so they aren't necessarily a lot of help.
For a path, you probably want to apply a transform rather than edit the path coordinates, which can get complicated. See http://www.w3.org/TR/SVG/coords.html#TransformAttribute
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With