Skip to content

Commit 44706f5

Browse files
committed
card animation
1 parent be26ce4 commit 44706f5

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

game/UI.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,8 +1428,7 @@ td.HandBookZombie {
14281428
visibility: hidden;
14291429
position: absolute;
14301430
top: -30px;
1431-
left: 50%;
1432-
margin-left: -445px;
1431+
left: calc(50% - 450px);
14331432
width: 900px;
14341433
height: 603px;
14351434
background: url(images/interface/AwardScreen_Back.jpg) no-repeat center center;

game/js/Cfunction.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2839,12 +2839,19 @@ var GetNewCard = function (ele, plantClass, nextLvl) {
28392839
StopMusic();
28402840
PlaySound2("winmusic");
28412841
oSym.Clear();
2842+
ele.style.transition = "all 3s ease-out";
2843+
ele.style.width = "100px";
2844+
ele.style.height = "120px";
2845+
ele.style.clip = "";
2846+
ele.style.clipPath = "inset(0 0 60px 0)";
2847+
// force reflow
2848+
void ele.offsetWidth;
28422849
SetStyle(ele, {
28432850
left: "350px",
28442851
top: "131px",
28452852
width: "200px",
28462853
height: "240px",
2847-
clip: "rect(0,auto,120px,0)",
2854+
clipPath: "inset(0 0 120px 0)",
28482855
cursor: "url(images/interface/Cursor.cur),default",
28492856
}).onclick = null;
28502857

0 commit comments

Comments
 (0)