Permalink
Browse files

Fixed width issues. Now the width and height sets the dimensions of t…

…he rounded white box rather than the whole thing.
  • Loading branch information...
1 parent 592cfb8 commit ad607a2a364950ed7b6b22dda06f2a49082b0e4a @jnunemaker committed Aug 7, 2008
Showing with 9 additions and 8 deletions.
  1. +7 −6 index.html
  2. +2 −2 js/fancyzoom.js
View
@@ -29,19 +29,20 @@
<body>
<p><a href="#small_box" id="small">Click me to zoom a small window</a></p>
+ <p><a href="#medium_box" id="medium">Click me to zoom a medium window</a></p>
+ <p><a href="#large_box" id="large">Click me to zoom a large window</a></p>
+
<div id="small_box">
- <p>Hello World!</p>
+ <p>Hello World from small box!</p>
</div>
- <p><a href="#medium_box" id="medium">Click me to zoom a medium window</a></p>
<div id="medium_box">
- <p>Hello World!</p>
+ <p>Hello World from medium box!</p>
</div>
- <p><a href="#large_box" id="large">Click me to zoom a large window</a></p>
<div id="large_box">
- <p>Hello World!</p>
+ <p>Hello World from large box!</p>
</div>
-
+
</body>
</html>
View
@@ -104,8 +104,8 @@ var FancyZoomBox = {
FancyZoomBox.zooming = true;
var element = e.element();
var related_div = element.content_div;
- var width = element.zoom_width || related_div.getWidth();
- var height = element.zoom_height || related_div.getHeight();
+ var width = (element.zoom_width || related_div.getWidth()) + 30;
+ var height = (element.zoom_height || related_div.getHeight()) + 10;
var d = Window.size();
var yOffset = document.viewport.getScrollOffsets()[1];
// ensure that newTop is at least 0 so it doesn't hide close button

0 comments on commit ad607a2

Please sign in to comment.