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 14:02:32 +00:00
parent afd9c70be6
commit abeb13af40

View File

@ -38,6 +38,7 @@ $.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.
targetWidth = targetHeight = 0;
basePosition = { top: options.of.pageY, left: options.of.pageX };
} else {