summaryrefslogtreecommitdiffstats
path: root/web/js/011-display.js
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2012-04-18 07:38:04 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2012-04-18 07:38:04 +0200
commit4643b9cd9f84817bfcc4fbdfb95ab421b16a5629 (patch)
treeb9e8bbd862cd3bfadc92165386c0ffcba81fe56f /web/js/011-display.js
parentWork around firefox image position bug. (diff)
downloadPhotoFloat-4643b9cd9f84817bfcc4fbdfb95ab421b16a5629.tar.xz
PhotoFloat-4643b9cd9f84817bfcc4fbdfb95ab421b16a5629.zip
Add support for full-screen on gecko and webkit.
Diffstat (limited to 'web/js/011-display.js')
-rw-r--r--web/js/011-display.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/web/js/011-display.js b/web/js/011-display.js
index 0971a26..ff2d2d4 100644
--- a/web/js/011-display.js
+++ b/web/js/011-display.js
@@ -153,7 +153,7 @@ $(document).ready(function() {
}
function showPhoto() {
var maxSize, width, height, photoSrc, previousPhoto, nextPhoto, nextLink, text;
- maxSize = 800;
+ maxSize = 1024;
width = currentPhoto.size[0];
height = currentPhoto.size[1];
if (width > height) {
@@ -288,12 +288,19 @@ $(document).ready(function() {
$("#photo-box").mouseleave(function() {
$("#photo-links").stop().fadeOut("slow");
});
- $("#next, #back").mouseenter(function() {
+ $("#next, #back, #fullscreen").mouseenter(function() {
$(this).fadeTo("slow", 1);
});
$("#next, #back").mouseleave(function() {
$(this).fadeTo("slow", 0.35);
});
+ if ($.support.fullscreen) {
+ $("#fullscreen").show().click(function() {
+ $("#photo").fullScreen();
+ }).mouseleave(function() {
+ $(this).fadeTo("slow", 0.50);
+ });
+ }
$("#metadata-link").click(function() {
if (!$("#metadata").is(":visible"))
$("#metadata").stop()