Remove requirement for a minimum image size in the image editor.
props ericlewis, solarissmoke. fixes #11325. Built from https://develop.svn.wordpress.org/trunk@29259 git-svn-id: http://core.svn.wordpress.org/trunk@29042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f6206e5850
commit
51db702770
|
@ -170,7 +170,6 @@ function wp_image_editor($post_id, $msg = false) {
|
|||
</div>
|
||||
|
||||
<input type="hidden" id="imgedit-sizer-<?php echo $post_id; ?>" value="<?php echo $sizer; ?>" />
|
||||
<input type="hidden" id="imgedit-minthumb-<?php echo $post_id; ?>" value="<?php echo ( get_option('thumbnail_size_w') . ':' . get_option('thumbnail_size_h') ); ?>" />
|
||||
<input type="hidden" id="imgedit-history-<?php echo $post_id; ?>" value="" />
|
||||
<input type="hidden" id="imgedit-undone-<?php echo $post_id; ?>" value="0" />
|
||||
<input type="hidden" id="imgedit-selection-<?php echo $post_id; ?>" value="" />
|
||||
|
|
|
@ -385,9 +385,8 @@ var imageEdit = window.imageEdit = {
|
|||
},
|
||||
|
||||
setCropSelection : function(postid, c) {
|
||||
var sel, min = $('#imgedit-minthumb-' + postid).val() || '128:128',
|
||||
var sel,
|
||||
sizer = this.hold.sizer;
|
||||
min = min.split(':');
|
||||
c = c || 0;
|
||||
|
||||
if ( !c || ( c.width < 3 && c.height < 3 ) ) {
|
||||
|
@ -399,12 +398,6 @@ var imageEdit = window.imageEdit = {
|
|||
return false;
|
||||
}
|
||||
|
||||
if ( c.width < (min[0] * sizer) && c.height < (min[1] * sizer) ) {
|
||||
this.setDisabled($('.imgedit-crop', '#imgedit-panel-' + postid), 0);
|
||||
$('#imgedit-selection-' + postid).val('');
|
||||
return false;
|
||||
}
|
||||
|
||||
sel = { 'x': c.x1, 'y': c.y1, 'w': c.width, 'h': c.height };
|
||||
this.setDisabled($('.imgedit-crop', '#imgedit-panel-' + postid), 1);
|
||||
$('#imgedit-selection-' + postid).val( JSON.stringify(sel) );
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue