rtalbot89/flow-svg

Possible to set height of single shape?

Closed this issue · 1 comments

I wonder if it is possible to set the height or width for a single shape in the flowSVG.shapes() section.

You can set the height in flowSVG.config(), but this sets the height of all shapes and I want just to have some of the shapes with other size because of the lenght of the text inside the shape.

I tried to set for example setting h: 80 in one of my shapes, but this setting does not take effect.

No it isn't possible. The layout is computed as a grid, so shapes need to be uniform in size. If it’s acceptable, a work around could be to use CSS to make the text smaller in some shapes. If you inspect the generated SVG source in the browser each text element has an ID, e.g. ‘SvgjsText1023’. You can use this to add a CSS rule.

On 15 Mar 2016, at 08:04, DonQuicky <notifications@github.commailto:notifications@github.com> wrote:

I wonder if it is possible to set the height or width for a single shape in the flowSVG.shapes() section.

You can set the height in flowSVG.config(), but this sets the height of all shapes and I want just to have some of the shapes with other size because of the lenght of the text inside the shape.

I tried to set for example setting h: 80 in one of my shapes, but this setting does not take effect.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#4