diff options
Diffstat (limited to 'public/javascripts/hover.js')
| -rw-r--r-- | public/javascripts/hover.js | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/public/javascripts/hover.js b/public/javascripts/hover.js index fd91ec5..5ab7cdc 100644 --- a/public/javascripts/hover.js +++ b/public/javascripts/hover.js @@ -72,7 +72,7 @@ var game = { focus: function (e) { // $("#really_waiting").html("FOCUS"); // socket.emit('focus', { id: _id }); - own_cursor.focus(); + // own_cursor.focus(); }, mousemove: function(e){ emit_mouse_movement(e); @@ -82,17 +82,21 @@ var game = { var hovering = false; own_cursor.blur(); - $("#racecar").bind({ - mouseover: function(){ + + $("#racecar").hoverpng({ + mouseover: function(e){ socket.emit('focus', { id: _id }); own_cursor.focus(); - }, - mouseout: function(){ + }, + mousemove: function(e){ + }, + mouseout: function(e){ socket.emit('blur', { id: _id }); own_cursor.blur(); - } - }); - + }, + threshold: 0.8 + }); + $(".okfocus").bind({ mouseover: function(){ own_cursor.el.hide(); @@ -247,7 +251,7 @@ function Cursor ( user, now ) { base.update = function(now){ var howlong = Math.floor( (now - base.start) ) + base.initial - base.delay; - base.time.html( timeInSecs( howlong ) ); + base.time.html( timeInMillisecs( howlong ) ); if (base.score) { base.score.update( howlong ); } |
