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

git-svn-id: https://develop.svn.wordpress.org/trunk@22592 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-11-15 02:20:29 +00:00
parent 45bcf643e8
commit 2dac32634e
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 );
}