r3006 commited - Position: Allow without "at" option passed. (Not need it when align to...
Revision: 3006
Author: cloudream@gmail.com
Date: Thu Jul 30 06:21:21 2009
Log: Position: Allow without "at" option passed. (Not need it when align to
cursor.)
http://code.google.com/p/jquery-ui/source/detail?r=3006
Modified:
/trunk/ui/ui.position.js
=======================================
--- /trunk/ui/ui.position.js Mon Jul 27 08:30:25 2009
+++ /trunk/ui/ui.position.js Thu Jul 30 06:21:21 2009
@@ -51,7 +51,7 @@
// force my and at to have valid horizontal and veritcal positions
// if a value is missing or invalid, it will be converted to center
$.each(['my', 'at'], function() {
- var pos = options[this].split(' ');
+ var pos = ( options[this] || horizontalDefault ).split(' ');
pos = pos.length == 1
? horizontalPositions.test(pos[0])
? pos.concat([verticalDefault])