jointjs
Version:
JavaScript diagramming library
8 lines (7 loc) • 714 B
HTML
<p>Set <code>cx</code> attribute 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 <code>cx</code> of the subelement will be set as a percentage
of the width of the referenced element. If the value is <code><0</code> or <code>>1</code>, the height
of the subelement will be smaller/bigger than the width of the referenced element by the amount specified.
Note that this makes sense only for SVG elements that support <code>rx</code> and <code>ry</code> attributes, such
as <code><ellipse></code>.
</p>