Ticket #11477: ticket-11477-part1-ver1.patch
File ticket-11477-part1-ver1.patch, 1.3 KB (added by , 15 years ago) |
---|
-
image-edit.dev.js
299 299 }, 300 300 301 301 initCrop : function(postid, image, parent) { 302 var t = this, selW = $('#imgedit-sel-width-' + postid), 303 selH = $('#imgedit-sel-height-' + postid); 302 var t = this; 304 303 305 304 t.iasapi = $(image).imgAreaSelect({ 306 305 parent: parent, … … 335 334 }, 336 335 337 336 onSelectChange: function(img, c) { 338 var sizer = imageEdit.hold.sizer; 339 selW.val( imageEdit.round(c.width / sizer) ); 340 selH.val( imageEdit.round(c.height / sizer) ); 337 imageEdit.setSelectionInputValues(c.width, c.height); 341 338 } 342 339 }); 343 340 }, 341 342 setSelectionInputValues : function(newwidth, newheight) { 343 var selW = $('#imgedit-sel-width-' + this.postid), 344 selH = $('#imgedit-sel-height-' + this.postid), 345 sizer = this.hold.sizer; 344 346 347 selW.val( this.round(newwidth / sizer) ); 348 selH.val( this.round(newheight / sizer) ); 349 }, 350 345 351 setCropSelection : function(postid, c) { 346 352 var sel, min = $('#imgedit-minthumb-' + postid).val() || '128:128', 347 353 sizer = this.hold['sizer']; … … 562 568 563 569 this.iasapi.setSelection( sel.x1, sel.y1, sel.x2, r ); 564 570 this.iasapi.update(); 571 this.setSelectionInputValues(sel.width, r - sel.y1); 565 572 } 566 573 } 567 574 }