From c99c707edaa6d78fdabac6d0edd5617b339a7c82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 2 Aug 2013 21:34:28 +0200 Subject: [PATCH] Fix fish --- file/js/be.bastelstu.Chat.litcoffee | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/file/js/be.bastelstu.Chat.litcoffee b/file/js/be.bastelstu.Chat.litcoffee index 0287111..0dd723f 100644 --- a/file/js/be.bastelstu.Chat.litcoffee +++ b/file/js/be.bastelstu.Chat.litcoffee @@ -391,9 +391,9 @@ Free the fish. fish = $ """
#{WCF.String.escapeHTML('><((((\u00B0>')}
""" fish.css - position: 'absolute' - top: '150px' - left: '400px' + position: 'fixed' + top: '50%' + left: '50%' color: 'black' textShadow: '1px 1px white' zIndex: 9999 @@ -404,8 +404,8 @@ Free the fish. top = Math.random() * 100 - 50 fish = $ '#fish' - left *= -1 unless fish.width() < (fish.position().left + left) < ($(document).width() - fish.width()) - top *= -1 unless fish.height() < (fish.position().top + top) < ($(document).height() - fish.height()) + left *= -1 unless fish.width() < (fish.position().left + left) < ($(window).width() - fish.width()) + top *= -1 unless fish.height() < (fish.position().top + top) < ($(window).height() - fish.height()) if left > 0 fish.text '><((((\u00B0>' if left > 0 @@ -413,8 +413,8 @@ Free the fish. fish.text '<\u00B0))))><' fish.animate - top: "+=#{top}" - left: "+=#{left}" + top: (fish.position().top + top) + left: (fish.position().left + left) , 1e3 , 1.5e3