/*
* imgAreaSelect jQuery plugin
- * version 0.9.8
+ * version 0.9.9
*
* Copyright (c) 2008-2011 Michal Wojciechowski (odyniec.net)
*
setSelection(selX(x1), selY(y1), selX(x1), selY(y1));
/* If this is an API call, callback functions should not be triggered */
- if (!this instanceof $.imgAreaSelect) {
+ if (!(this instanceof $.imgAreaSelect)) {
options.onSelectChange(img, getSelection());
options.onSelectEnd(img, getSelection());
}
* properties
*/
function styleOptions($elem, props) {
- for (option in props)
+ for (var option in props)
if (options[option] !== undefined)
$elem.css(props[option], options[option]);
}
* attribute seems to trigger it. The check is for version 7 and above to
* accommodate for MSIE 9 running in compatibility mode.
*/
- if ($.browser.msie && $.browser.version >= 7)
+ if (!imgLoaded && $.browser.msie && $.browser.version >= 7)
img.src = img.src;
};