Difference between revisions of "VTimelineDrawAnnotation"
From Sega Retro
(Created page with "<includeonly><div style="display:none;"> {{#vardefine:top|{{#expr:(({{#time:U|{{{1|0}}}}}-{{#var:starttime}})/{{#var:totaltime}})*{{#var:timelineheight}}}}}}{{ #if:{{#var:las...") |
(divide by 0) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><div style="display:none;"> | <includeonly><div style="display:none;"> | ||
− | {{#vardefine:top|{{#expr:(({{#time:U|{{{1|0}}}}}-{{#var:starttime}})/{{#var:totaltime}})*{{#var:timelineheight}}}}}}{{ | + | {{#vardefine:top|{{#expr:(({{#time:U|{{{1|0}}}}}-{{#var:starttime}})/{{#ifeq:{{#var:totaltime}}|0|1|{{#var:totaltime}}}})*{{#var:timelineheight}}}}}}{{ |
#if:{{#var:lasttop}}|{{ | #if:{{#var:lasttop}}|{{ | ||
#ifexpr:abs({{#var:top}}-{{#var:lasttop}}) < 20|{{ | #ifexpr:abs({{#var:top}}-{{#var:lasttop}}) < 20|{{ | ||
Line 10: | Line 10: | ||
}} | }} | ||
− | </div><div style="position:relative; width: {{#if:{{#var:moveright}}|230|20}}px; height:1px; left: 0px; top: {{#var:top}}px; border-top:{{#if:{{#var:moveright}}|dashed|solid}} 1px #000000; margin-top:-1px;"><div style="position: relative; top: -8px; left: {{#if:{{#var:moveright}}|255|25}}px; font-size:10px; width:200px; z-index:10;"><div style="width:max-content; padding-left:4px; padding-right:4px; margin-left:-4px;" class="annotation">{{{1|}}}: {{{2|}}}</div></div></div> | + | </div><div style="position:relative; width: {{#if:{{#var:moveright}}|230|20}}px; height:1px; left: 0px; top: {{#var:top}}px; border-top:{{#if:{{#var:moveright}}|dashed|solid}} 1px #000000; margin-top:-1px;"><div style="position: relative; top: -8px; left: {{#if:{{#var:moveright}}|255|25}}px; font-size:10px; width:200px; z-index:10;"><div style="width:max-content; padding-left:4px; padding-right:4px; margin-left:-4px;" class="annotation">{{{1|}}}: {{{2|}}}</div></div></div>{{#if:{{#var:moveright}}|<div style="position:relative; width: 20px; height:1px; left: 230px; top: {{#var:top}}px; border-top:solid 1px #000000; margin-top:-1px;"></div>|}}{{#vardefine:lasttop|{{#var:top}}}}</includeonly><noinclude> |
+ | |||
+ | Template responsible for drawing annotations. | ||
[[Category:Templates]]</noinclude> | [[Category:Templates]]</noinclude> |
Latest revision as of 11:55, 29 April 2022
Template responsible for drawing annotations.