Permalink
Browse files

added Neil Gast's bugfix for positioning

  • Loading branch information...
1 parent 6842deb commit f657b281784ffb0faccbadd102213b2636d94f20 @jaz303 committed Oct 14, 2008
Showing with 22 additions and 3 deletions.
  1. +20 −1 docs/tests.html
  2. +2 −2 src/javascripts/jquery.boxy.js
View
@@ -14,7 +14,13 @@
<link rel="stylesheet" href="stylesheets/boxy.css" type="text/css" />
<!-- END per project stuff -->
-
+ <script type='text/javascript'>
+ function lorem(opts) {
+ new Boxy("<div style='width: 350px'>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>", opts);
+ return false;
+ }
+ </script>
+
</head>
<body>
<div id='container'>
@@ -116,6 +122,19 @@ <h2>Show</h2>
</li>
</ul>
+ <h2>Positioning</h2>
+ <ul>
+ <li>
+ <a href='#' onclick='return lorem({x: 200});'>200, DEFAULT</a>
+ </li>
+ <li>
+ <a href='#' onclick='return lorem({y: 200});'>DEFAULT, 200</a>
+ </li>
+ <li>
+ <a href='#' onclick='return lorem({center: false});'>DEFAULT, DEFAULT</a>
+ </li>
+ </ul>
+
</div>
<script type='text/javascript'>
@@ -91,8 +91,8 @@ function Boxy(element, options) {
this.center();
} else {
this.moveTo(
- Boxy._u(this.options.x) ? this.options.x : Boxy.DEFAULT_X,
- Boxy._u(this.options.y) ? this.options.y : Boxy.DEFAULT_Y
+ Boxy._u(this.options.x) ? Boxy.DEFAULT_X : this.options.x,
+ Boxy._u(this.options.y) ? Boxy.DEFAULT_Y : this.options.y
);
}

0 comments on commit f657b28

Please sign in to comment.