Skip to content

Commit

Permalink
#16 coordinates are emitted to the ControlPeerCommunicationHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
TorbenHaug committed Dec 10, 2016
1 parent 36acdaa commit c0952f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/public/js/ControlPeerMain.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
var FingerPositionHandler = require('./FingerPositionHandler.js');
var ControlPeerCommunicationHandler = require('./ControlPeerCommunicationHandler.js');

ControlPeerCommunicationHandler.init();

var fingerPositionHandler = new FingerPositionHandler(
"touchInput",
40,
[function(x,y){
document.getElementById("mousePosition").innerHTML = "x= " + x + "y= " + y;
}]
},
ControlPeerCommunicationHandler.sendPosition]
);
2 changes: 0 additions & 2 deletions src/public/js/FingerPositionHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ function FingerPositionHandler(canvas, interval, callbackFunctions){
for (var i = 0, len = callbackFunctions.length; i < len; i++) {
callbackFunctions[i](_x, _y);
}
console.log("send: x= " + _x + "y= " + _y + ", after : " + (currentTime - _lastSendTime));
console.error("send has to be implemented");
if(_lastSendTime){
_lastSendDiff = (currentTime - _lastSendTime) - _interval;
if(_lastSendDiff < 0){
Expand Down

0 comments on commit c0952f7

Please sign in to comment.