Skip to content

Commit

Permalink
Added explicit input source to mouse up event
Browse files Browse the repository at this point in the history
  • Loading branch information
importre committed Feb 3, 2014
1 parent 49aaaae commit 6d2844d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scripts/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ adb.controller("controller", ["$scope", "$q", "socketService", "$sce", function
var y = event.offsetY * $scope.scaleOfMousePad;

var cmd1 = "host:transport:" + serial;
var cmd2 = "shell:input tap " + x + " " + y;
var cmd2 = "shell:input touchscreen tap " + x + " " + y;

var x1 = $scope.mouseDownX;
var y1 = $scope.mouseDownY;
Expand All @@ -666,7 +666,7 @@ adb.controller("controller", ["$scope", "$q", "socketService", "$sce", function
var dist = Math.sqrt(Math.pow(x - x1, 2) + Math.pow(y - y1, 2));
// console.log("dist : " + dist);
if (dist > 30) {
cmd2 = "shell:input swipe " + [x1, y1, x, y, $scope.swipeDuration].join(" ")
cmd2 = "shell:input touchscreen swipe " + [x1, y1, x, y, $scope.swipeDuration].join(" ")
console.log(cmd2);
}
}
Expand Down

0 comments on commit 6d2844d

Please sign in to comment.