From 175f36076bbb742ce078ece9529a86649dc900ef Mon Sep 17 00:00:00 2001 From: Chi Cheng Date: Thu, 30 Jul 2009 13:21:21 +0000 Subject: [PATCH] Position: Allow without "at" option passed. (Not need it when align to cursor.) --- ui/ui.position.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/ui.position.js b/ui/ui.position.js index 897df866f..b0c4bc871 100644 --- a/ui/ui.position.js +++ b/ui/ui.position.js @@ -51,7 +51,7 @@ $.fn.position = function(options) { // 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]) -- 2.39.5