Round rather than floor values in image editing JS to avoid decrementing values on each run. props SergeyBiryukov. fixes #22011.

git-svn-id: http://core.svn.wordpress.org/trunk@22592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-11-15 02:20:29 +00:00
parent 3c9a45435f
commit 52007a46c1
1 changed files with 2 additions and 2 deletions

View File

@ -72,10 +72,10 @@ imageEdit = {
warn = $('#imgedit-scale-warn-' + postid), w1 = '', h1 = '';
if ( x ) {
h1 = (w.val() != '') ? this.intval( w.val() / this.hold['xy_ratio'] ) : '';
h1 = (w.val() != '') ? Math.round( w.val() / this.hold['xy_ratio'] ) : '';
h.val( h1 );
} else {
w1 = (h.val() != '') ? this.intval( h.val() * this.hold['xy_ratio'] ) : '';
w1 = (h.val() != '') ? Math.round( h.val() * this.hold['xy_ratio'] ) : '';
w.val( w1 );
}