EPUB: use preserveAspectRatio="xMidYMid" for cover image (#6895)
This change affects both the epub2 and the epub3 templates. It avoids distortion of the cover image by requiring that the aspect ratio be preserved.
This commit is contained in:
parent
a9c766291f
commit
97b70d20bb
2 changed files with 2 additions and 2 deletions
|
@ -48,7 +48,7 @@ $endif$
|
|||
$else$
|
||||
$if(coverpage)$
|
||||
<div id="cover-image">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" viewBox="0 0 $cover-image-width$ $cover-image-height$" preserveAspectRatio="none">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" viewBox="0 0 $cover-image-width$ $cover-image-height$" preserveAspectRatio="xMidYMid">
|
||||
<image width="$cover-image-width$" height="$cover-image-height$" xlink:href="../media/$cover-image$" />
|
||||
</svg>
|
||||
</div>
|
||||
|
|
|
@ -49,7 +49,7 @@ $endif$
|
|||
$else$
|
||||
$if(coverpage)$
|
||||
<div id="cover-image">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" viewBox="0 0 $cover-image-width$ $cover-image-height$" preserveAspectRatio="none">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" viewBox="0 0 $cover-image-width$ $cover-image-height$" preserveAspectRatio="xMidYMid">
|
||||
<image width="$cover-image-width$" height="$cover-image-height$" xlink:href="../media/$cover-image$" />
|
||||
</svg>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue