Improved pasting images on retina devices.

This commit is contained in:
Martin Edenhofer 2016-05-27 15:30:36 +02:00
parent 0a3bdffc93
commit c2c71ca06d

View file

@ -165,6 +165,13 @@ function toCamelCase(str) {
.replace(/^(.)/, function($1) { return $1.toUpperCase(); }); .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 = { jQuery.event.special.remove = {
remove: function(e) { remove: function(e) {
if (e.handler) e.handler(); if (e.handler) e.handler();