Skip to content

Commit

Permalink
Fixed recently-introduced error in presize function
Browse files Browse the repository at this point in the history
  • Loading branch information
tapmodo committed Jan 2, 2012
1 parent 89c86e5 commit d8c367c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion js/jquery.Jcrop.js
Expand Up @@ -186,7 +186,6 @@
//}}}
function presize($obj, w, h) //{{{
{
$obj = $(obj);
var nw = $obj.width(),
nh = $obj.height();
if ((nw > w) && w > 0) {
Expand Down
4 changes: 2 additions & 2 deletions js/jquery.Jcrop.min.js
@@ -1,5 +1,5 @@
/**
* jquery.Jcrop.min.js v0.9.9 {{{ (build:20120101)
* jquery.Jcrop.min.js v0.9.9 {{{ (build:20120102)
* jQuery Image Cropping Plugin - released under MIT License
* Copyright (c) 2008-2012 Tapmodo Interactive LLC
* https://github.com/tapmodo/Jcrop
Expand Down Expand Up @@ -29,7 +29,7 @@ function createDragger(ord)
if((ord==='move')&&!options.allowMove){return false;}
docOffset=getPos($img);btndown=true;startDragMode(ord,mouseAbs(e));e.stopPropagation();e.preventDefault();return false;};}
function presize($obj,w,h)
{$obj=$(obj);var nw=$obj.width(),nh=$obj.height();if((nw>w)&&w>0){nw=w;nh=(w/$obj.width())*$obj.height();}
{var nw=$obj.width(),nh=$obj.height();if((nw>w)&&w>0){nw=w;nh=(w/$obj.width())*$obj.height();}
if((nh>h)&&h>0){nh=h;nw=(h/$obj.height())*$obj.width();}
xscale=$obj.width()/nw;yscale=$obj.height()/nh;$obj.width(nw).height(nh);}
function unscale(c)
Expand Down

0 comments on commit d8c367c

Please sign in to comment.