Allow positioning for figures with non-svg sources

This commit is contained in:
2018-01-01 13:22:01 +01:00
parent 458652bcae
commit 2d3b9e7c05
2 changed files with 5 additions and 7 deletions
+4 -6
View File
@@ -31,16 +31,14 @@
#end
#macro(figure_style $fig)
style="
top:${fig.top}px;
right:${fig.right}px;
bottom:${fig.bottom}px;
left:${fig.left}px;
#if($fig.source == "svg") ## Unsupported with other sources due to being fonts, not images **
#if($fig.autoscale)
top:${fig.top}px;
right:${fig.right}px;
bottom:${fig.bottom}px;
left:${fig.left}px;
height:calc(100% - ${fig.size}px);
#else
top:calc(${fig.top}px - ${fig.bottom}px);
left:calc(${fig.left}px - ${fig.right}px);
height:${fig.scale}%;
#end
#end
+1 -1
View File
@@ -30,7 +30,7 @@
<br>Rotation: x deg
<br>Scale: x % <small>(Leave blank for auto)</small>
<br>Source: svg, mdi...
<br><br><small>NOTE: svg source required for attributes other than rotation!</small>
<br><br><small>NOTE: svg source required for scaling!</small>
</div>
</i>