Template:ProtoFluxConnector: Difference between revisions

Template page
mNo edit summary
Width bound to Height bound argument
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#tag:svg|
{{#switch:{{{Type|}}}
{{#switch:{{{Type|}}}
|InputArrow=
|InputArrow=
<svg width="30" height="70" style="display:block;">
<polygon style="stroke-width:4px;" points="2,2 2,68 28,35"></polygon>
<polygon style="stroke-width:4px;" points="2,2 2,68 28,35"></polygon>
</svg>
|OutputArrow=
|OutputArrow=
<svg width="30" height="70" style="display:block;">
<polygon style="stroke-width:4px;" points="2,2 2,68 28,35"></polygon>
<polygon style="stroke-width:4px;" points="2,2 2,68 28,35"></polygon>
</svg>
|InputBox=
|InputBox=
<svg width="30" height="70" style="display:block;">
<polygon style="stroke-width:4px;" points="-2,2 -2,68 28,68 28,2"></polygon>
<polygon style="stroke-width:4px;" points="-2,2 -2,68 28,68 28,2"></polygon>
</svg>
|OutputBox=
|OutputBox=
<svg width="30" height="70" style="display:block;">
<polygon style="stroke-width:4px;" points="2,2 2,68 32,68 32,2"></polygon>
<polygon style="stroke-width:4px;" points="2,2 2,68 32,68 32,2"></polygon>
</svg>
}}
 
{{#switch:{{{Segments|1}}}
|1=
|2=
<!-- InputBox-2 -->
<line stroke-width="3" x1="0" y1="35" x2="30" y2="35"></line>
|3=
<!-- InputBox-3 -->
<line stroke-width="3" x1="0" y1="23.333" x2="30" y2="23.3"></line>
<line stroke-width="3" x1="0" y1="46.667" x2="30" y2="46.6"></line>
|4=
<!-- InputBox-4 -->
<line stroke-width="3" x1="0" y1="17.5" x2="30" y2="17.5"></line>
<line stroke-width="3" x1="0" y1="35" x2="30" y2="35"></line>
<line stroke-width="3" x1="0" y1="52.5" x2="30" y2="52.5"></line>
}}
 
|viewBox=0 0 30 70|height={{{Height|70}}}|style=display: block;/**/{{{Style|}}}
}}
}}


<noinclude>
<noinclude>
Example:
Example:
<div style="fill:skyblue; stroke: white;">
<div style="fill:#606; stroke: #f0f;">
{{ProtoFluxConnector|Type=InputArrow}}
{{ProtoFluxConnector|Type=InputArrow}}
{{ProtoFluxConnector|Type=OutputArrow}}
{{ProtoFluxConnector|Type=OutputArrow}}
{{ProtoFluxConnector|Type=InputBox}}
{{ProtoFluxConnector|Type=InputBox}}
{{ProtoFluxConnector|Type=InputBox|Segments=2}}
{{ProtoFluxConnector|Type=InputBox|Segments=3}}
{{ProtoFluxConnector|Type=InputBox|Segments=4}}
{{ProtoFluxConnector|Type=OutputBox}}
{{ProtoFluxConnector|Type=OutputBox}}
{{ProtoFluxConnector|Type=OutputBox|Segments=2}}
{{ProtoFluxConnector|Type=OutputBox|Segments=3}}
{{ProtoFluxConnector|Type=OutputBox|Segments=4}}
</div>
</div>
</noinclude>
</noinclude>

Latest revision as of 21:15, 11 February 2024


Example: