Skip to content

Commit

Permalink
added Neil Gast's bugfix for positioning
Browse files Browse the repository at this point in the history
  • Loading branch information
jaz303 committed Oct 14, 2008
1 parent 6842deb commit f657b28
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
21 changes: 20 additions & 1 deletion docs/tests.html
Expand Up @@ -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'>
Expand Down Expand Up @@ -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'>
Expand Down
4 changes: 2 additions & 2 deletions src/javascripts/jquery.boxy.js
Expand Up @@ -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
);
}

Expand Down

0 comments on commit f657b28

Please sign in to comment.