Position: set "at" option while align to cursor, fixes collision:flip not work with default value

This commit is contained in:
Chi Cheng 2009-08-02 16:17:07 +00:00
parent abeb13af40
commit a962d52902

View File

@ -38,7 +38,8 @@ $.fn.position = function(options) {
targetHeight = target.height();
basePosition = { top: target.scrollTop(), left: target.scrollLeft() };
} else if (options.of.preventDefault) {
options.at = "left top"; // while align to cursor, "at" default value "center" causes "collision:flip" not work.
// while align to cursor, "at" default value "center" causes "collision:flip" not work
options.at = "left top";
targetWidth = targetHeight = 0;
basePosition = { top: options.of.pageY, left: options.of.pageX };
} else {