Position: add target property to feedback argument, to allow additional calculation in user's using callback

This commit is contained in:
Jörn Zaefferer
2012-04-12 17:33:05 +02:00
parent 2154ca552a
commit 1779d86b40

View 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;