Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions js/jquery.Jcrop.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* jquery.Jcrop.js v0.9.12
* jquery.Jcrop.js v0.9.13
* jQuery Image Cropping Plugin - released under MIT License
* Author: Kelly Hallman <khallman@gmail.com>
* http://github.com/tapmodo/Jcrop
Expand Down Expand Up @@ -35,10 +35,24 @@
var options = $.extend({}, $.Jcrop.defaults),
docOffset,
_ua = navigator.userAgent.toLowerCase(),
is_msie = /msie/.test(_ua),
ie6mode = /msie [1-6]\./.test(_ua);
is_msie = isInternetExplorer(_ua),
ie6mode = isInternetExplorer6(_ua);

// Internal Methods {{{
function isInternetExplorer(ua) {
var msie = ua.indexOf("MSIE ");
if (msie > 0 || !!ua.match(/Trident.*rv\:11\./)) {
return true;
}
return false;
}

function isInternetExplorer6(ua) {
var msie = ua.indexOf("MSIE ");
var ieVersion = parseInt(ua.substring(msie + 5, ua.indexOf(".", msie)));
return ieVersion <= 6;
}

function px(n) {
return Math.round(n) + 'px';
}
Expand Down