From 19bcbc86823ff873b9bdd167331bbeb6a106c204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=AB=E8=B0=B7=E5=89=91=E4=BB=99?= Date: Mon, 19 Jul 2021 16:45:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B32P=E6=8D=A2=E9=98=9F=E9=95=BF?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/script.js b/script.js index 23778992..3fa7287a 100644 --- a/script.js +++ b/script.js @@ -3599,13 +3599,13 @@ function refreshAll(formationData) { { return; } - if (leaderIdx > 0 && ti == 0) + if (leaderIdx > 0 && ti == 0) //队长 { - dom.style.transform = `translateX(${leaderIdx*108}px)`; + dom.style.transform = formation.teams.length == 2 && teamNum == 1 ? `translateX(${(5-leaderIdx)*-108}px)` : `translateX(${leaderIdx*108}px)`; } - else if (leaderIdx > 0 && ti == leaderIdx) + else if (leaderIdx > 0 && ti == leaderIdx) //队长员 { - dom.style.transform = `translateX(${ti*-108}px)`; + dom.style.transform = formation.teams.length == 2 && teamNum == 1 ? `translateX(${(5-ti)*108}px)` : `translateX(${ti*-108}px)`; }else { dom.style.transform = null;