]> source.dussan.org Git - jquery-ui.git/commitdiff
Position: add target property to feedback argument, to allow additional calculation...
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Thu, 12 Apr 2012 15:33:05 +0000 (17:33 +0200)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Thu, 12 Apr 2012 15:33:05 +0000 (17:33 +0200)
ui/jquery.ui.position.js

index c5c02aa1d66253931f87514c2b66433519505fd1..76b9cca2120878206543ac9d7ab9dd08e9d8fe90 100644 (file)
@@ -227,7 +227,8 @@ $.fn.position = function( options ) {
                                        bottom = (targetOffset.top + targetHeight) - (props.top + elemHeight),
                                        feedback = {
                                                horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
-                                               vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
+                                               vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle",
+                                               target: target
                                        },
                                        max = Math.max,
                                        abs = Math.abs;