mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
tests draggable #2965 - fixed to account for distance: 1 default
This commit is contained in:
parent
980fbbea51
commit
0f0fb77a9e
@ -467,7 +467,7 @@ test("#2965 cursorAt with margin", function() {
|
|||||||
var before = el.offset();
|
var before = el.offset();
|
||||||
var pos = { clientX: before.left + ox, clientY: before.top + oy };
|
var pos = { clientX: before.left + ox, clientY: before.top + oy };
|
||||||
$("#draggable2").simulate("mousedown", pos);
|
$("#draggable2").simulate("mousedown", pos);
|
||||||
$(document).simulate("mousemove", pos);
|
$(document).simulate("mousemove", { clientX: pos.clientX + 1, clientY: pos.clientY + 1});
|
||||||
$(document).simulate("mousemove", pos);
|
$(document).simulate("mousemove", pos);
|
||||||
$("#draggable2").simulate("mouseup", pos);
|
$("#draggable2").simulate("mouseup", pos);
|
||||||
var expected = actual;
|
var expected = actual;
|
||||||
@ -479,7 +479,7 @@ test("#2965 cursorAt with margin", function() {
|
|||||||
var before = el.offset();
|
var before = el.offset();
|
||||||
var pos = { clientX: before.left + ox - marg, clientY: before.top + oy - marg };
|
var pos = { clientX: before.left + ox - marg, clientY: before.top + oy - marg };
|
||||||
$("#draggable2").simulate("mousedown", pos);
|
$("#draggable2").simulate("mousedown", pos);
|
||||||
$(document).simulate("mousemove", pos);
|
$(document).simulate("mousemove", { clientX: pos.clientX + 1, clientY: pos.clientY + 1});
|
||||||
$(document).simulate("mousemove", pos);
|
$(document).simulate("mousemove", pos);
|
||||||
$("#draggable2").simulate("mouseup", pos);
|
$("#draggable2").simulate("mouseup", pos);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user