Make WordPress Core

Ticket #11325: 11325.2.diff

File 11325.2.diff, 1.7 KB (added by ericlewis, 12 years ago)
  • src/wp-admin/js/image-edit.js

     
    385385        },
    386386
    387387        setCropSelection : function(postid, c) {
    388                 var sel, min = $('#imgedit-minthumb-' + postid).val() || '128:128',
     388                var sel,
    389389                        sizer = this.hold.sizer;
    390                         min = min.split(':');
    391390                        c = c || 0;
    392391
    393392                if ( !c || ( c.width < 3 && c.height < 3 ) ) {
     
    399398                        return false;
    400399                }
    401400
    402                 if ( c.width < (min[0] * sizer) && c.height < (min[1] * sizer) ) {
    403                         this.setDisabled($('.imgedit-crop', '#imgedit-panel-' + postid), 0);
    404                         $('#imgedit-selection-' + postid).val('');
    405                         return false;
    406                 }
    407 
    408401                sel = { 'x': c.x1, 'y': c.y1, 'w': c.width, 'h': c.height };
    409402                this.setDisabled($('.imgedit-crop', '#imgedit-panel-' + postid), 1);
    410403                $('#imgedit-selection-' + postid).val( JSON.stringify(sel) );
  • src/wp-admin/includes/image-edit.php

     
    170170                </div>
    171171
    172172                <input type="hidden" id="imgedit-sizer-<?php echo $post_id; ?>" value="<?php echo $sizer; ?>" />
    173                 <input type="hidden" id="imgedit-minthumb-<?php echo $post_id; ?>" value="<?php echo ( get_option('thumbnail_size_w') . ':' . get_option('thumbnail_size_h') ); ?>" />
    174173                <input type="hidden" id="imgedit-history-<?php echo $post_id; ?>" value="" />
    175174                <input type="hidden" id="imgedit-undone-<?php echo $post_id; ?>" value="0" />
    176175                <input type="hidden" id="imgedit-selection-<?php echo $post_id; ?>" value="" />