Skip to content

Commit

Permalink
position: add document link; values should be string but not defaultV…
Browse files Browse the repository at this point in the history
…alue variant
  • Loading branch information
chicheng committed Jul 26, 2009
1 parent ee3a171 commit 85193b5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ui/ui.position.js
Expand Up @@ -5,7 +5,7 @@
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* TODO: create document page for position and add link here
* http://docs.jquery.com/UI/Position
*/
(function($) {

Expand Down Expand Up @@ -80,7 +80,7 @@ $.fn.position = function(options) {
case 'right':
basePosition.left += targetWidth;
break;
case horizontalDefault:
case 'center':
basePosition.left += targetWidth / 2;
break;
}
Expand All @@ -89,7 +89,7 @@ $.fn.position = function(options) {
case 'bottom':
basePosition.top += targetHeight;
break;
case verticalDefault:
case 'center':
basePosition.top += targetHeight / 2;
break;
}
Expand All @@ -110,7 +110,7 @@ $.fn.position = function(options) {
case 'right':
position.left -= elemWidth;
break;
case horizontalDefault:
case 'center':
position.left -= elemWidth / 2;
break;
}
Expand All @@ -119,7 +119,7 @@ $.fn.position = function(options) {
case 'bottom':
position.top -= elemHeight;
break;
case verticalDefault:
case 'center':
position.top -= elemHeight / 2;
break;
}
Expand Down

0 comments on commit 85193b5

Please sign in to comment.