UNPKG

jointjs

Version:

JavaScript diagramming library

11 lines (10 loc) 1 kB
<p><i>alias:</i> <b>ref-width</b></p> <p>Set width of the subelement relatively to the width of the element referenced to by the selector in <code>ref</code> attribute. If the value is in the <code>[0, 1]</code> interval (or expressed in percentages, e.g. <code>'80%'</code>), the width of the subelement will be set as a percentage of the width of the referenced element. If the value is <code>&lt;0</code> or <code>&gt;1</code>, the width of the subelement will be smaller/bigger than the width of the referenced element by the amount specified. For example, <code>'ref-width': .75</code> sets the width of the subelement to <code>75%</code> of the width of the referenced element. <code>'ref-width': 20</code> makes the width to be <code>20px</code> less than the width of the referenced element. Note that this makes sense only for SVG elements that support <code>width</code> and <code>height</code> attributes, such as <code data-lang="svg">&lt;rect&gt;</code>. </p>