Author: rfrovarp
Date: Wed Dec 19 09:12:47 2007
New Revision: 605623
URL: http://svn.apache.org/viewvc?rev=605623&view=rev
Log:
Round to nearest integer for scaling. Thanks to Jörn for the suggestion.
Modified:
lenya/trunk/src/modules/editors/resources/javascript/insertAsset.js
Modified: lenya/trunk/src/modules/editors/resources/javascript/insertAsset.js
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/editors/resources/javascript/insertAsset.js?rev=605623&r1=605622&r2=605623&view=diff
==============================================================================
--- lenya/trunk/src/modules/editors/resources/javascript/insertAsset.js (original)
+++ lenya/trunk/src/modules/editors/resources/javascript/insertAsset.js Wed Dec 19 09:12:47 2007
@@ -36,7 +36,7 @@
*/
function scaleHeight(width) {
var ratio = document.forms['insertAsset'].ratio.value;
- document.forms['insertAsset'].height.value = width * ratio;
+ document.forms['insertAsset'].height.value = Math.round(width * ratio);
focus();
}
@@ -45,7 +45,7 @@
*/
function scaleWidth(height) {
var ratio = document.forms['insertAsset'].ratio.value;
- document.forms['insertAsset'].width.value = height * 1.0 / ratio;
+ document.forms['insertAsset'].width.value = Math.round(height * 1.0 / ratio);
focus();
}
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.