Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
DoNaTio s.r.o.
PiPo
Commits
2c7b359b
Commit
2c7b359b
authored
Dec 09, 2014
by
Monika
Browse files
edges playground - racket
parent
cf62182f
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/ClientMain.js
View file @
2c7b359b
...
...
@@ -48,6 +48,7 @@ $(function () {
var
socket
=
io
();
var
$playground
=
$
(
"
#playground
"
);
var
playgroundHalf
=
$playground
.
width
()
/
2
;
$playground
.
mousemove
(
function
(
event
)
{
var
d
=
{
...
...
@@ -56,12 +57,12 @@ $(function () {
y
:
event
.
pageY
-
$playground
.
offset
().
top
};
if
(
user
.
getTeam
()
==
0
&&
d
.
x
<
$
playground
.
width
()
/
2
){
d
.
x
=
$
playground
.
width
()
/
2
;
if
(
user
.
getTeam
()
==
0
&&
d
.
x
<
playground
Half
){
d
.
x
=
playground
Half
;
}
if
(
user
.
getTeam
()
==
1
&&
d
.
x
>
$
playground
.
width
()
/
2
){
d
.
x
=
$
playground
.
width
()
/
2
;
if
(
user
.
getTeam
()
==
1
&&
d
.
x
>
playground
Half
){
d
.
x
=
playground
Half
;
}
racket
.
setAxis
(
event
.
pageX
-
$playground
.
offset
().
left
,
event
.
pageY
-
$playground
.
offset
().
top
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment