From 954e04477d66569799bacd9963fd7df22441c604 Mon Sep 17 00:00:00 2001 From: Harrys Ravalomanana Date: Tue, 23 Jul 2019 11:27:11 +0400 Subject: [PATCH] PHRAS-2665 #comment fix code review #time 1h --- .../web/prod/actions/Tools/videoEditor.html.twig | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/templates/web/prod/actions/Tools/videoEditor.html.twig b/templates/web/prod/actions/Tools/videoEditor.html.twig index b0064cc978..d9a798291a 100644 --- a/templates/web/prod/actions/Tools/videoEditor.html.twig +++ b/templates/web/prod/actions/Tools/videoEditor.html.twig @@ -52,11 +52,7 @@ {% set prevRatio = '' %} {% if width and height %} - {% set rawRatio = (width / height)|number_format(3, '.') %} - {% set rawRatioLength = rawRatio|length %} - {% set ratio = rawRatio|slice(0,rawRatioLength-1) %} - {% else %} - {% set ratio = '' %} + {% set ratio = (width / height)|number_format(3, '.') %} {% endif %} {#Set the document Ratio #} @@ -66,13 +62,9 @@ {% set height = subdef.get_height() %} {% if width and height %} - {% set rawRatio = (width / height)|number_format(3, '.') %} - {% set rawRatioLength = rawRatio|length %} {% if subdef.get_name()=='preview' %} - {% set prevRatio = rawRatio|slice(0,rawRatioLength-1) %} + {% set prevRatio = (width / height)|number_format(3, '.') %} {% endif %} - {% else %} - {% set prevRatio = '' %} {% endif %} {% endfor %}