You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2008/04/13 12:37:30 UTC

svn commit: r647554 - /lenya/trunk/src/modules/editors/usecases/insertAsset.jx

Author: andreas
Date: Sun Apr 13 03:37:27 2008
New Revision: 647554

URL: http://svn.apache.org/viewvc?rev=647554&view=rev
Log:
Round image width on InsertAsset page.

Modified:
    lenya/trunk/src/modules/editors/usecases/insertAsset.jx

Modified: lenya/trunk/src/modules/editors/usecases/insertAsset.jx
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/editors/usecases/insertAsset.jx?rev=647554&r1=647553&r2=647554&view=diff
==============================================================================
--- lenya/trunk/src/modules/editors/usecases/insertAsset.jx (original)
+++ lenya/trunk/src/modules/editors/usecases/insertAsset.jx Sun Apr 13 03:37:27 2008
@@ -105,7 +105,7 @@
                     <jx:choose>
                       <jx:when test="${mimeType.startsWith('image/')}">
                         <!-- Add one to avoid dividing by 0 -->
-                        <jx:set var="scaledWidth" value="${width / ( height + 1 ) * 32.0}"/>
+                        <jx:set var="scaledWidth" value="${Packages.java.lang.Math.round(width / ( height + 1 ) * 32.0)}"/>
                         <img src="${url}?lenya.module=svg&amp;height=32&amp;width=${scaledWidth}" style="height: 32px; vertical-align: middle; margin: 3px 0px;"/>&#160; 
                       </jx:when>
                       <jx:otherwise>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org