Ticket #11477: ticket-11477-part2-ver1.patch
File ticket-11477-part2-ver1.patch, 855 bytes (added by , 15 years ago) |
---|
-
image-edit.dev.js
550 550 }); 551 551 552 552 if ( sel = this.iasapi.getSelection(true) ) { 553 r = Math.ceil( sel.y1 + ((sel.x2 - sel.x1) / (x / y)));553 newy2 = sel.y1 + Math.round((sel.x2 - sel.x1) / (x / y)); 554 554 555 if ( r > h ) { 556 r = h; 557 if ( n ) 558 $('#imgedit-crop-height-' + postid).val(''); 559 else 560 $('#imgedit-crop-width-' + postid).val(''); 555 if ( newy2 > h ) { 556 newy2 = h; 557 newx2 = sel.x1 + Math.round((newy2 - sel.y1) * (x / y)); 558 } else { 559 newx2 = sel.x2; 561 560 } 562 561 563 this.iasapi.setSelection( sel.x1, sel.y1, sel.x2, r);562 this.iasapi.setSelection( sel.x1, sel.y1, newx2, newy2 ); 564 563 this.iasapi.update(); 565 564 } 566 565 }