aboutsummaryrefslogtreecommitdiffstats
path: root/tests/visual
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-10-25 06:39:14 -0400
committerScott González <scott.gonzalez@gmail.com>2012-10-25 06:39:14 -0400
commit2582bfab46613da613f1a3354bc733b68a110b95 (patch)
tree5515634203be660eccf283b14868ade5f2ddf3e5 /tests/visual
parentbc44e61dd9e6797bb23bc3038d43436a8ba052c3 (diff)
downloadjquery-ui-2582bfab46613da613f1a3354bc733b68a110b95.tar.gz
jquery-ui-2582bfab46613da613f1a3354bc733b68a110b95.zip
Position: Removed offset option. Fixes #6982 - Position: Remove offset option.
Diffstat (limited to 'tests/visual')
-rw-r--r--tests/visual/position/position_feedback.html29
-rw-r--r--tests/visual/tooltip/tooltip.html6
2 files changed, 16 insertions, 19 deletions
diff --git a/tests/visual/position/position_feedback.html b/tests/visual/position/position_feedback.html
index fe1f04e5b..fb3bf00fd 100644
--- a/tests/visual/position/position_feedback.html
+++ b/tests/visual/position/position_feedback.html
@@ -55,25 +55,24 @@
});
element.width( 150 );
- $( document ).on( "mousemove", function( event ) {
- var base = {
+ function positionWithOffset( horizontal, vertical ) {
+ return {
my: "left top",
- at: "left top",
+ at: "left" + (horizontal < 0 ? horizontal : "+" + horizontal) + " " +
+ "top" + (vertical < 0 ? vertical : "+" + vertical),
of: target,
using: using
};
- element.position( $.extend({
- offset: (event.pageX - targetOffset.left) + " " + (event.pageY - targetOffset.top)
- }, base ));
- oppositeElement.position( $.extend({
- offset: (-1 * (event.pageX - targetOffset.left)) + " " + (-1 * (event.pageY - targetOffset.top))
- }, base ));
- leftElement.position( $.extend({
- offset: (-0.9 * (event.pageX - targetOffset.left)) + " " + (0.9 * (event.pageY - targetOffset.top))
- }, base ));
- rightElement.position( $.extend({
- offset: (0.9 * (event.pageX - targetOffset.left)) + " " + (-0.9 * (event.pageY - targetOffset.top))
- }, base) );
+ };
+ $( document ).on( "mousemove", function( event ) {
+ element.position( positionWithOffset(
+ event.pageX - targetOffset.left, event.pageY - targetOffset.top ) );
+ oppositeElement.position( positionWithOffset(
+ -1 * (event.pageX - targetOffset.left), -1 * (event.pageY - targetOffset.top) ) );
+ leftElement.position( positionWithOffset(
+ -0.9 * (event.pageX - targetOffset.left), 0.9 * (event.pageY - targetOffset.top) ) );
+ rightElement.position( positionWithOffset(
+ 0.9 * (event.pageX - targetOffset.left), -0.9 * (event.pageY - targetOffset.top) ) );
});
});
</script>
diff --git a/tests/visual/tooltip/tooltip.html b/tests/visual/tooltip/tooltip.html
index 598af0ee8..706ed5091 100644
--- a/tests/visual/tooltip/tooltip.html
+++ b/tests/visual/tooltip/tooltip.html
@@ -66,8 +66,7 @@
tooltipClass: "ui-state-highlight",
position: {
my: "center top",
- at: "center bottom",
- offset: "0 10"
+ at: "center bottom+10"
}
});
@@ -86,8 +85,7 @@
$( "#buttons" ).tooltip({
position: {
my: "center bottom",
- at: "center top",
- offset: "0 -5"
+ at: "center top-5"
}
});