summaryrefslogtreecommitdiff
path: root/lib/gallery.show_full_size.js
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-06-28 19:42:41 -0700
committerBharat Mediratta <bharat@menalto.com>2009-06-28 19:42:41 -0700
commit228962f0e836c303174d0be6d0ff246628ea85d9 (patch)
tree7eb49584d785d8ae14247b3a9a92c0a0a191ffcb /lib/gallery.show_full_size.js
parent24f0c4bd1914e5dc62d4fef936c901227620abbe (diff)
Use Number() instead of toFixed().. FF 3.x doesn't seem to like toFixed() on native types.
Diffstat (limited to 'lib/gallery.show_full_size.js')
-rw-r--r--lib/gallery.show_full_size.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gallery.show_full_size.js b/lib/gallery.show_full_size.js
index b2895c23..8b271db9 100644
--- a/lib/gallery.show_full_size.js
+++ b/lib/gallery.show_full_size.js
@@ -26,10 +26,10 @@ var show_full_size = function(image_url, image_width, image_height) {
// handle the case where the calculation is almost zero (2.14e-14)
return {
- top: ((windowHeight - imageHeight) / 2).toFixed(2),
- left: ((windowWidth - imageWidth) / 2).toFixed(2),
- width: imageWidth.toFixed(2),
- height: imageHeight.toFixed(2)
+ top: Number((windowHeight - imageHeight) / 2),
+ left: Number((windowWidth - imageWidth) / 2),
+ width: Number(imageWidth),
+ height: Number(imageHeight)
};
}