diff options
| author | Jules Laplace <jules@okfoc.us> | 2013-01-28 17:57:50 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2013-01-28 17:57:50 -0500 |
| commit | 78b95db387738279d8c1a648949bb8a57f6bf506 (patch) | |
| tree | 23f778455051b0cddd36d38dcb5d31b782d62f05 | |
| parent | 708218bf19f71d141d0bdd1a0fb86924e8eeab25 (diff) | |
margin
| -rw-r--r-- | public/images/cursor-white.png | bin | 459 -> 3127 bytes | |||
| -rw-r--r-- | public/javascripts/game.js | 4 | ||||
| -rw-r--r-- | public/javascripts/hover.js | 4 | ||||
| -rw-r--r-- | public/javascripts/hoverpng.js | 2 | ||||
| -rw-r--r-- | public/stylesheets/style.css | 8 |
5 files changed, 9 insertions, 9 deletions
diff --git a/public/images/cursor-white.png b/public/images/cursor-white.png Binary files differindex 89db769..09954ba 100644 --- a/public/images/cursor-white.png +++ b/public/images/cursor-white.png diff --git a/public/javascripts/game.js b/public/javascripts/game.js index 2dce5d6..2db6885 100644 --- a/public/javascripts/game.js +++ b/public/javascripts/game.js @@ -42,7 +42,7 @@ var game = { }); socket.on('mouse', function(data){ if (data.id != _id && data.id in users) { - users[data.id].cursor.el.css({ 'margin-right': -data.x, 'margin-bottom': -data.y }); + users[data.id].cursor.el.css({ 'margin-left': data.x, 'margin-top': data.y }); } }); socket.on('focus', function(data) { @@ -115,7 +115,7 @@ var UI = { if (user.id != _id && ! user.cursor) { var cursor = new Cursor( user, now ); user.cursor = cursor; - user.cursor.el.css({ 'margin-right': -user.x, 'margin-bottom': -user.y }); + user.cursor.el.css({ 'margin-left': user.x, 'margin-top': user.y }); } else if (user.id == _id && own_cursor) { user.cursor = own_cursor; diff --git a/public/javascripts/hover.js b/public/javascripts/hover.js index 5ab7cdc..dfee104 100644 --- a/public/javascripts/hover.js +++ b/public/javascripts/hover.js @@ -42,7 +42,7 @@ var game = { }); socket.on('mouse', function(data){ if (data.id != _id && data.id in users) { - users[data.id].cursor.el.css({ 'margin-right': -data.x, 'margin-bottom': -data.y }); + users[data.id].cursor.el.css({ 'margin-left': data.x, 'margin-top': data.y }); } }); socket.on('focus', function(data) { @@ -132,7 +132,7 @@ var UI = { if (user.id != _id && ! user.cursor) { var cursor = new Cursor( user, now ); user.cursor = cursor; - user.cursor.el.css({ 'margin-right': -user.x, 'margin-bottom': -user.y }); + user.cursor.el.css({ 'margin-left': user.x, 'margin-top': user.y }); } else if (user.id == _id && own_cursor) { user.cursor = own_cursor; diff --git a/public/javascripts/hoverpng.js b/public/javascripts/hoverpng.js index de7cdd5..ec75bb6 100644 --- a/public/javascripts/hoverpng.js +++ b/public/javascripts/hoverpng.js @@ -24,7 +24,7 @@ base.build = function(){ $(window).bind({ - 'blur': function(){ hovering = false; } + 'blur': base.mouseout }); base.$el.bind({ 'load': base.fetch, diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css index 415a0ad..1c3d3ab 100644 --- a/public/stylesheets/style.css +++ b/public/stylesheets/style.css @@ -359,12 +359,12 @@ header { .cursor { pointer-events: none; position: absolute; - bottom: 50%; - right: 50%; + top: 50%; + left: 50%; width: 32px; height: 32px; - margin-bottom: -9999px; - margin-right: -9999px; + margin-top: -9999px; + margin-left: -9999px; z-index:0; -webkit-transform: translateZ(0); -webkit-transition: all .1s ease-out; |
