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

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
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>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.