Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add retina display support #420

Merged
merged 1 commit into from

6 participants

@samuelvogel

This adds optional retina display support for the gallery images.

@samuelvogel

Any news on this one?

@tobiasmuecksch

This feature is very useful!
Please merge.

@renatocarvalho

Please!

@ramzesimus

Also waiting for retina support.
Thanks

@html5anchor

Retina is not going away. We need this one too.

@fancyapps fancyapps merged commit 91fd960 into fancyapps:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 17, 2012
  1. @samuelvogel

    Add retina display support

    samuelvogel authored
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 2 deletions.
  1. +3 −2 source/jquery.fancybox.js
View
5 source/jquery.fancybox.js
@@ -60,6 +60,7 @@
minHeight : 100,
maxWidth : 9999,
maxHeight : 9999,
+ pixelRatio: 1, // Set to 2 for retina display support
autoSize : true,
autoHeight : false,
@@ -939,8 +940,8 @@
img.onload = function () {
this.onload = this.onerror = null;
- F.coming.width = this.width;
- F.coming.height = this.height;
+ F.coming.width = this.width / F.opts.pixelRatio;
+ F.coming.height = this.height / F.opts.pixelRatio;
F._afterLoad();
};
Something went wrong with that request. Please try again.