From 09ff1409ba1d6e12b04287ecaf77f63b13ef5ea5 Mon Sep 17 00:00:00 2001 From: Mithgol Date: Thu, 1 Aug 2013 00:33:09 -0700 Subject: [PATCH] alternate way of getting image's dimensions Should fix odyniec/imgareaselect#45 if @Huji is correct. --- jquery.imgareaselect.dev.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jquery.imgareaselect.dev.js b/jquery.imgareaselect.dev.js index fe499a5..a2dea6e 100755 --- a/jquery.imgareaselect.dev.js +++ b/jquery.imgareaselect.dev.js @@ -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;