summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Jones <brian.j.jones@intel.com>2012-09-26 13:26:27 -0700
committerBrian Jones <brian.j.jones@intel.com>2012-09-26 13:26:27 -0700
commitb87cacb589cf274b16333e32af80d28d4c6151e8 (patch)
treee0b37087239031681151a036a2a05dbba094d654
parent32f2a92c2f0e1c0ab2d786b9549a41555b86748e (diff)
downloadremotecontrol-b87cacb589cf274b16333e32af80d28d4c6151e8.tar.gz
remotecontrol-b87cacb589cf274b16333e32af80d28d4c6151e8.tar.bz2
remotecontrol-b87cacb589cf274b16333e32af80d28d4c6151e8.zip
Fixing ip finding error. Also putting mouse events back in.HEADsubmit/trunk/20120926.202842accepted/trunk/20120926.2031031.0_branch1.0
-rw-r--r--remotecontrol/www/js/masterControl.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/remotecontrol/www/js/masterControl.js b/remotecontrol/www/js/masterControl.js
index fdab9a3..733f541 100644
--- a/remotecontrol/www/js/masterControl.js
+++ b/remotecontrol/www/js/masterControl.js
@@ -149,10 +149,8 @@ function loadImages(sources, callback)
function connect()
{
var host = window.location.hostname;
- if(host == "localhost")
- ws = new WebSocket("ws://localhost:9999/");
- else
- ws = new WebSocket("ws://10.7.198.99:9999/");
+ ws = new WebSocket("ws://" + host + ":9999/");
+
ws.onopen = function() {
send({
"type": "connect",
@@ -256,12 +254,11 @@ button: "assets/button.png",
$(window).bind('resize', resizeCanvas);
- //mouseClicksLayer.addEventListener('mousemove', onMouseMove);
- //mouseClicksLayer.addEventListener('mouseup', onMouseUp);
+ mouseClicksLayer.addEventListener('mousemove', onMouseMove);
+ mouseClicksLayer.addEventListener('mousedown', onMouseDown);
mouseClicksLayer.addEventListener('touchmove', onTouchMove);
mouseClicksLayer.addEventListener('touchstart', onTouchStart);
mouseClicksLayer.addEventListener('touchend', onTouchEnd);
- //connect();
}
function switchMenu(nextMenu)