diff options
author | Brian Jones <brian.j.jones@intel.com> | 2012-09-26 13:26:27 -0700 |
---|---|---|
committer | Brian Jones <brian.j.jones@intel.com> | 2012-09-26 13:26:27 -0700 |
commit | b87cacb589cf274b16333e32af80d28d4c6151e8 (patch) | |
tree | e0b37087239031681151a036a2a05dbba094d654 | |
parent | 32f2a92c2f0e1c0ab2d786b9549a41555b86748e (diff) | |
download | remotecontrol-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.js | 11 |
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) |