[Pkg-javascript-commits] [dojo] 21/27: Do mousemove timing in javascript, rather than in java. This is getting intermittent failures on Tree_dnd.html but I think I can resolve them after the next checkin, where I monitor events on the document to tell when java robot actually executes each command. Refs #15590 !strict.
David Prévot
taffit at moszumanska.debian.org
Sun Sep 14 16:23:06 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag 1.7.6
in repository dojo.
commit b62a5075bde3c6759db234c98ab1b4ef7a2cc3d2
Author: Bill Keese <bill at dojotoolkit.org>
Date: Fri Jul 13 07:27:06 2012 +0000
Do mousemove timing in javascript, rather than in java. This is getting intermittent failures on Tree_dnd.html but I think I can resolve them after the next checkin, where I monitor events on the document to tell when java robot actually executes each command. Refs #15590 !strict.
git-svn-id: http://svn.dojotoolkit.org/src/dojo/trunk@29202 560b804f-0ae3-0310-86f3-f6aa0a117693
(cherry picked from commit 0eb6042a4a93aaf709d134f8ce1aadc1a13aa6f9)
Conflicts:
robot.js
---
robot.js | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/robot.js b/robot.js
index f410e1b..b795774 100644
--- a/robot.js
+++ b/robot.js
@@ -152,19 +152,24 @@ dojo.mixin(doh.robot,{
//
doh.robot._assertRobot();
- duration = duration||100;
+
+ // Schedule an action to scroll the node into view, then calculate it's center point
+ var point = {};
this.sequence(function(){
- node=doh.robot._resolveNode(node);
+ node = doh.robot._resolveNode(node);
doh.robot._scrollIntoView(node);
var pos = doh.robot._position(node);
if(offsetY === undefined){
offsetX=pos.w/2;
offsetY=pos.h/2;
}
- var x = pos.x+offsetX;
- var y = pos.y+offsetY;
- doh.robot._mouseMove(x, y, false, duration);
- }, delay, duration);
+ point.x = pos.x+offsetX;
+ point.y = pos.y+offsetY;
+ }, delay);
+
+ // Schedule a bunch of actions to move the mouse from the current position to point.
+ // These actions won't run until after the above callback.
+ this.mouseMoveTo(point, 0, duration, false);
}
});
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/dojo.git
More information about the Pkg-javascript-commits
mailing list