Title: [Plugin: Scissors] Small Resizing Feature Request
Last modified: August 19, 2016

---

# [Plugin: Scissors] Small Resizing Feature Request

 *  Resolved [alkafy](https://wordpress.org/support/users/alkafy/)
 * (@alkafy)
 * [17 years ago](https://wordpress.org/support/topic/plugin-scissors-small-resizing-feature-request/)
 * As you type the units to resize one dimension of an image, it would be great 
   if the other dimension was dynamically calculated and displayed. Not a huge deal–
   it would just be a little helpful. Otherwise, incredibly useful plugin. Thank
   you.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [stephanreiter](https://wordpress.org/support/users/stephanreiter/)
 * (@stephanreiter)
 * [17 years ago](https://wordpress.org/support/topic/plugin-scissors-small-resizing-feature-request/#post-1083718)
 * Sounds good and should be simple to implement. Thanks for the suggestion!
 *  Thread Starter [alkafy](https://wordpress.org/support/users/alkafy/)
 * (@alkafy)
 * [17 years ago](https://wordpress.org/support/topic/plugin-scissors-small-resizing-feature-request/#post-1083727)
 * I’m sure you could do this more elegantly, but I hacked together a solution:
 * Line 768 scissors.php
 * `$resizeValue = "<input style='width:3em;text-align:center;' type='text' id='
   scissorsSide-$postId' value='640' onkeyup=\"scissorsCalcResize($postId)\" />";`
 * New Function in scissors.js
 * function scissorsCalcResize(id) {
    var resizeDim = Number(jQuery(‘#scissorsSide-‘
   +id).val()); var dimensions = jQuery(‘#scissorsSize-‘+id).html().split(‘ × ‘);
   var width = Number(dimensions[0]); var height = Number(dimensions[1]); var resizeMode
   = jQuery(‘#scissorsMode-‘+id).val();
 *  if (resizeMode!=’width’ && resizeMode!=’height’) {
    var longSide = ‘width’; 
   var shortSide = ‘height’; if (width<height) { longSide = ‘height’; shortSide 
   = ‘width’; } if (resizeMode==’long’) { resizeMode = longSide; }else { resizeMode
   = shortSide; } }
 *  if (resizeMode==’width’) {
    height = Math.floor((resizeDim/width)*height); width
   = resizeDim; } else { width = Math.floor((resizeDim/height)*width); height = 
   resizeDim; }
 *  if (jQuery(‘#newSizes-‘+id).length==0) {
    jQuery(‘#scissorsSize-‘+id).after(‘
   <span id=”newSizes-‘+id+'”></span>’); } jQuery(‘#newSizes-‘+id).html(‘ **Calculated
   Size: **‘+width+’ x ‘+height); }
 *  [stephanreiter](https://wordpress.org/support/users/stephanreiter/)
 * (@stephanreiter)
 * [17 years ago](https://wordpress.org/support/topic/plugin-scissors-small-resizing-feature-request/#post-1083848)
 * Implemented and part of the new development version (find it under ‘other versions’).
   Please test it and if you’re satisfied mark this thread as resolved. Thanks!
 *  Thread Starter [alkafy](https://wordpress.org/support/users/alkafy/)
 * (@alkafy)
 * [17 years ago](https://wordpress.org/support/topic/plugin-scissors-small-resizing-feature-request/#post-1083890)
 * Nicely done. Thank you very much.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: Scissors] Small Resizing Feature Request’ is closed to new replies.

 * 4 replies
 * 2 participants
 * Last reply from: [alkafy](https://wordpress.org/support/users/alkafy/)
 * Last activity: [17 years ago](https://wordpress.org/support/topic/plugin-scissors-small-resizing-feature-request/#post-1083890)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
