Skip to content

Commit 9959647

Browse files
committed
fix: increase the calculated ratio to three digits
1 parent 1a5ed7f commit 9959647

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

CHANGELOG_de-DE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Gebe alt- und title-Attribute bei Thumbnails aus, wenn diese beim Bild gespeichert wurden
44
* Entferne Nutzung von Höhe bei den Thumbnailgrößen, da die automatische Berechnung der notwendigen Größe darauf keinen direkten Bezug nimmt
55
* Bitte entfernen Sie die Höhe aus Ihrem Template in den Plugin-Einstellungen
6+
* Erhöhe berechnete Ratio auf drei Stellen
67

78
# 1.0.19
89

CHANGELOG_en-GB.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Output alt and title attributes for thumbnails if they were saved with the image in media
44
* Remove the use of height from the thumbnail sizes, as the automatic calculation of the necessary size does not make any direct reference to it
55
* Please remove the height from your template in the plugin settings
6+
* Increase the calculated ratio to three digits
67

78
# 1.0.19
89

src/Resources/views/storefront/utilities/thumbnail.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
{{ media|sw_encode_media_url }} {{ thumbnails|first.width + 1 }}w, {% for thumbnail in thumbnails %}{{ thumbnail.url | sw_encode_url }} {{ thumbnail.width }}w{% if not loop.last %}, {% endif %}{% endfor %}
2727
{% endapply %}{% endset %}
2828
{% endif %}
29-
{% set ratio = (metaProportion.width / max(metaProportion.height, 1))|round(2, 'floor') %}
29+
{% set ratio = (metaProportion.width / max(metaProportion.height, 1))|round(3, 'floor') %}
3030

3131
{% if fullWidth %}
3232
{% if ratio >= 1 %}

0 commit comments

Comments
 (0)