allow card init animation to be controllable
This commit is contained in:
parent
481171bfec
commit
b6e175c193
2 changed files with 6 additions and 2 deletions
|
@ -134,7 +134,7 @@ function getMessage( m )
|
|||
|
||||
|
||||
|
||||
function drawNewCard(id, text, x, y, rot, colour, sticker)
|
||||
function drawNewCard(id, text, x, y, rot, colour, sticker, animationspeed)
|
||||
{
|
||||
//cards[id] = {id: id, text: text, x: x, y: y, rot: rot, colour: colour};
|
||||
|
||||
|
@ -181,10 +181,13 @@ function drawNewCard(id, text, x, y, rot, colour, sticker)
|
|||
}
|
||||
);
|
||||
|
||||
var speed = Math.floor(Math.random() * 1000);
|
||||
if (typeof(animationspeed) != 'undefined') speed = animationspeed;
|
||||
|
||||
$("#" + id).animate({
|
||||
left: x + "px",
|
||||
top: y + "px"
|
||||
}, Math.floor(Math.random() * 1000));
|
||||
}, speed);
|
||||
|
||||
$("#" + id).hover(
|
||||
function(){
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/client/*
|
||||
.DS_Store
|
||||
/.git/*
|
||||
*.rdb
|
||||
|
|
Loading…
Add table
Reference in a new issue