From 2d3b9e7c057179d9011124ae9bce5eb6aa7f067c Mon Sep 17 00:00:00 2001 From: Robert Maikher Date: Mon, 1 Jan 2018 13:22:01 +0100 Subject: [PATCH] Allow positioning for figures with non-svg sources --- resources/cards/card.vm | 10 ++++------ resources/cards/creator.vm | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/resources/cards/card.vm b/resources/cards/card.vm index 906e122..0d92512 100644 --- a/resources/cards/card.vm +++ b/resources/cards/card.vm @@ -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 diff --git a/resources/cards/creator.vm b/resources/cards/creator.vm index f803740..dc71931 100644 --- a/resources/cards/creator.vm +++ b/resources/cards/creator.vm @@ -30,7 +30,7 @@
Rotation: x deg
Scale: x % (Leave blank for auto)
Source: svg, mdi... -

NOTE: svg source required for attributes other than rotation! +

NOTE: svg source required for scaling!