svn commit: r647554 - /lenya/trunk/src/modules/editors/usecases/insertAsset.jx
[email protected] Sun, 13 Apr 2008 10:37:30 -0000
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&height=32&width=${scaledWidth}" style="height: 32px; vertical-align: middle; margin: 3px 0px;"/> 
</jx:when>
<jx:otherwise>