Skip to content

Commit

Permalink
241218 Bug fix (#49)
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Lee <haulrest@gmail.com>
  • Loading branch information
HU-Lee authored Dec 17, 2024
1 parent 4cb67ff commit 8abb5eb
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
9 changes: 9 additions & 0 deletions src/components/atoms/button/Download.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ const DownloadButton: React.FC<DownloadProps> = ({ tag }) => {
if (!element) return;
setModal(ModalType.loading);
try {
element.querySelectorAll(".shadow").forEach((element) => {
element.classList.remove("shadow");
element.classList.add("temporary");
});
const canvas = await html2canvas(element, {
scale: 1.1,
allowTaint: true,
Expand All @@ -44,6 +48,11 @@ const DownloadButton: React.FC<DownloadProps> = ({ tag }) => {
ignoreElements: (element) => element.id === "downloader",
});

element.querySelectorAll(".temporary").forEach((element) => {
element.classList.remove("temporary");
element.classList.add("shadow");
});

if (navigator.userAgent.match(/NAVER|KAKAOTALK/i)) {
Swal.fire({
title: "Data Migration",
Expand Down
1 change: 1 addition & 0 deletions src/components/organisms/analysis/LegacyAnalysis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const LegacyAnalysis: React.FC<AnalysisProps> = ({ allCharacters }) => {
const { t } = useTranslation();

const baseCharacters = allCharacters
.concat()
.filter((char) => getNumber(char) < 1000)
.sort((a, b) => a.id.localeCompare(b.id));

Expand Down
12 changes: 7 additions & 5 deletions src/components/organisms/analysis/LegacyTableAnalysis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ import DownloadButton from "../../atoms/button/Download";
const LegacyTableAnalysis: React.FC<AnalysisProps> = ({ allCharacters }) => {
const { t, i18n } = useTranslation();
const { setModal } = useModalStore();
const baseCharacters = allCharacters.sort((a, b) =>
getShortName(t(a.code), i18n.language).localeCompare(
getShortName(t(b.code), i18n.language)
)
);
const baseCharacters = allCharacters
.concat()
.sort((a, b) =>
getShortName(t(a.code), i18n.language).localeCompare(
getShortName(t(b.code), i18n.language)
)
);

return (
<>
Expand Down
3 changes: 2 additions & 1 deletion src/components/organisms/analysis/StardreamAnalysis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ const StardreamAnalysis: React.FC<AnalysisProps> = ({ allCharacters }) => {
const { t, i18n } = useTranslation();

const baseCharacters = allCharacters
.concat()
.filter(
(char, idx) =>
char.category === AECategories.encounter &&
char.style !== AECharacterStyles.four &&
(!ShowRecentStyles ||
!allCharacters
.slice(idx+1)
.slice(idx + 1)
.map((c) => c.code)
.includes(char.code)) &&
(!ShowSevenPiece ||
Expand Down
1 change: 1 addition & 0 deletions src/components/organisms/analysis/WhiteKeyAnalysis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const WhiteKeyAnalysis: React.FC<AnalysisProps> = ({ allCharacters }) => {
const { t, i18n } = useTranslation();

const baseCharacters = allCharacters
.concat()
.filter(
(char) =>
char.category === AECategories.encounter &&
Expand Down

0 comments on commit 8abb5eb

Please sign in to comment.