Improved pasting images on retina devices.
This commit is contained in:
parent
0a3bdffc93
commit
c2c71ca06d
1 changed files with 7 additions and 0 deletions
|
@ -165,6 +165,13 @@ function toCamelCase(str) {
|
|||
.replace(/^(.)/, function($1) { return $1.toUpperCase(); });
|
||||
};
|
||||
|
||||
function isRetina(){
|
||||
if (window.matchMedia) {
|
||||
var mq = window.matchMedia("only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 2.6/2), only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (min-device-pixel-ratio: 1.3), only screen and (min-resolution: 1.3dppx)");
|
||||
return (mq && mq.matches || (window.devicePixelRatio > 1));
|
||||
}
|
||||
}
|
||||
|
||||
jQuery.event.special.remove = {
|
||||
remove: function(e) {
|
||||
if (e.handler) e.handler();
|
||||
|
|
Loading…
Reference in a new issue