aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/selectable/selectable_core.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/selectable/selectable_core.js')
-rw-r--r--tests/unit/selectable/selectable_core.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/unit/selectable/selectable_core.js b/tests/unit/selectable/selectable_core.js
index d2e885fc7..de89e66a7 100644
--- a/tests/unit/selectable/selectable_core.js
+++ b/tests/unit/selectable/selectable_core.js
@@ -2,15 +2,15 @@
* selectable_core.js
*/
-var el;
-
-TestHelpers.selectableDrag = function drag(dx, dy) {
- var off = el.offset(), pos = { clientX: off.left, clientY: off.top };
- el.simulate("mousedown", pos);
- $(document).simulate("mousemove", pos);
- pos.clientX += dx;
- pos.clientY += dy;
- $(document).simulate("mousemove", pos);
- $(document).simulate("mouseup", pos);
-};
-
+TestHelpers.selectable = {
+ drag: function drag(el, dx, dy) {
+ var off = el.offset(),
+ pos = { clientX: off.left, clientY: off.top };
+ el.simulate("mousedown", pos);
+ $(document).simulate("mousemove", pos);
+ pos.clientX += dx;
+ pos.clientY += dy;
+ $(document).simulate("mousemove", pos);
+ $(document).simulate("mouseup", pos);
+ }
+}; \ No newline at end of file