From ee3a1718fb818f48b7de25266d9637c674f6e879 Mon Sep 17 00:00:00 2001 From: Chi Cheng Date: Sat, 25 Jul 2009 19:56:11 +0000 Subject: [PATCH] position: make it work without ui.core.js --- ui/ui.position.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ui/ui.position.js b/ui/ui.position.js index b77e96e60..330443c47 100644 --- a/ui/ui.position.js +++ b/ui/ui.position.js @@ -9,6 +9,8 @@ */ (function($) { +$.ui = $.ui || {}; + var horizontalPositions = /left|center|right/, horizontalDefault = 'center', verticalPositions = /top|center|bottom/, @@ -20,9 +22,7 @@ $.fn.position = function(options) { return _position.apply(this, arguments); } - options = $.extend({ - stackFix: true - }, options); + options = $.extend({}, $.ui.position.defaults, options); var target = $(options.of), collision = (options.collision || 'flip').split(' '), @@ -146,6 +146,9 @@ $.fn.position = function(options) { }; $.ui.position = { + defaults:{ + stackFix: true + }, fit: { left: function(position, data) { var over = position.left + data.elemWidth - $(window).width() - $(window).scrollLeft(); -- 2.39.5