Skip to content
Snippets Groups Projects
Commit d586c004 authored by kopareigns's avatar kopareigns
Browse files

Better handling of very tall slaves

parent f574bafd
No related branches found
No related tags found
1 merge request!3561Better handling of very tall slaves
......@@ -10,16 +10,17 @@
/* setup height scaling and style */
<<if $seeHeight == 0 || ($seeHeight == 1 && $args[1] == 3)>>
<<set _slaveHeightScale = 100>>
<<set _slaveHeightScale = 1>>
<<set _margin = 0>>
<<else>>
<<set _slaveHeightScale = Math.trunc(_artSlave.height/2)>>
<<set _margin = 100 - _slaveHeightScale>>
<<set _slaveHeightScale = _artSlave.height/200>>
<<set _margin = Math.max(50 - (50 * _slaveHeightScale), 0)>>
<</if>>
<<print "<style>."+_art_display_class+" {
position: absolute;
height: " + _slaveHeightScale + "%;
height: 100%;
transform: scale(" + _slaveHeightScale + ");
margin-top: " + _margin + "%;
margin-left: auto;
margin-right: auto;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment