Skip to content

Commit

Permalink
alternate way of getting image's dimensions
Browse files Browse the repository at this point in the history
Should fix odyniec#45 if @Huji is correct.
  • Loading branch information
Mithgol committed Aug 1, 2013
1 parent 3817ae0 commit 09ff140
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jquery.imgareaselect.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ $.imgAreaSelect = function (img, options) {
imgOfs = { left: round($img.offset().left), top: round($img.offset().top) };

/* Get image dimensions */
imgWidth = $img.innerWidth();
imgHeight = $img.innerHeight();
imgWidth = $img.width();
imgHeight = $img.height();

imgOfs.top += ($img.outerHeight() - imgHeight) >> 1;
imgOfs.left += ($img.outerWidth() - imgWidth) >> 1;
Expand Down

0 comments on commit 09ff140

Please sign in to comment.