From ebe9389be2ffce3cc10e29715e51cf2f852c937f Mon Sep 17 00:00:00 2001 From: Slime-hatena Date: Fri, 8 Mar 2024 01:16:48 +0900 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=E7=94=BB=E5=83=8F=E7=94=9F=E6=88=90?= =?UTF-8?q?=E6=A9=9F=E8=83=BD=E3=81=AE=E5=AE=8C=E4=BA=86=E5=BE=8C=E3=83=9A?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=81=AE=E5=9B=BA=E5=AE=9A=E3=82=92=E8=A7=A3?= =?UTF-8?q?=E9=99=A4=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/assets/js/userProgress.ts | 50 +++++++++++-------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/OngekiScoreLog/resources/assets/js/userProgress.ts b/OngekiScoreLog/resources/assets/js/userProgress.ts index e1dbfe62..c910f9ff 100644 --- a/OngekiScoreLog/resources/assets/js/userProgress.ts +++ b/OngekiScoreLog/resources/assets/js/userProgress.ts @@ -3,25 +3,30 @@ let images = progress.length; let renderingState = 0; async function convert(element: HTMLElement, index: number) { - let pr: Html2CanvasPromise = html2canvas(element, { - width: 640, - }); - - await pr.then(canvas => { - ++renderingState - let base64 = canvas.toDataURL(); - - $('div#generate_images').append( - $("").attr("src", base64) - ); - - $('.progress').val(renderingState / images * 100); - $(".progress-message").text("画像化中: " + renderingState + "/" + images + "(" + Math.round(renderingState / images * 100) + "%)"); + try { + let pr: Html2CanvasPromise = html2canvas(element, { + width: 640, + }); + + await pr.then(canvas => { + ++renderingState + let base64 = canvas.toDataURL(); + + $('div#generate_images').append( + $("").attr("src", base64) + ); + + $('.progress').val(renderingState / images * 100); + $(".progress-message").text("画像化中: " + renderingState + "/" + images + "(" + Math.round(renderingState / images * 100) + "%)"); + + }).catch((res) => { + // $(".progress-message").text("エラーが発生しました。
" + JSON.stringify(res)); + throw res; + }); + } catch (error) { + // エラったらとりあえず無視 特定環境でたまに起きるらしい + } - }).catch((res) => { - $(".progress-message").text("エラーが発生しました。
" + JSON.stringify(res)); - throw res; - }); } $(function ($) { @@ -43,10 +48,15 @@ $(function ($) { for (let index = 0; index < progress.length; index++) { const element: HTMLElement = progress[index]; - await convert(element, index); } - $('.progress').removeClass("is-progress").removeAttr("value").removeAttr("max"); + // 固定解除 + $('html').css('overflow', 'visible'); + $('body').css('overflow', 'visible'); + document.addEventListener('touchmove', function (e) { /* */ }, { passive: false }); + + $(".progress-message").text("画像化完了! (" + renderingState + "枚)"); + // $('.progress').removeClass("is-progress").removeAttr("value").removeAttr("max"); }) }); From 3a3e683b4463c2426473116d74fdb47a4555787d Mon Sep 17 00:00:00 2001 From: Slime-hatena Date: Fri, 8 Mar 2024 01:25:51 +0900 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20=E5=88=B0=E9=81=94=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E3=83=AC=E3=83=BC=E3=83=88=E3=82=924=E6=A1=81?= =?UTF-8?q?=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OngekiScoreLog/resources/views/user_rating.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OngekiScoreLog/resources/views/user_rating.blade.php b/OngekiScoreLog/resources/views/user_rating.blade.php index e0ae6e2c..2fb74e99 100644 --- a/OngekiScoreLog/resources/views/user_rating.blade.php +++ b/OngekiScoreLog/resources/views/user_rating.blade.php @@ -72,7 +72,7 @@

- 到達可能レーティング: {{sprintf("%.2f",floor($statistics->maxRatingTotal / $statistics->totalRatingCount * 100) / 100)}}
+ 到達可能レーティング: {{sprintf("%.4f",floor($statistics->maxRatingTotal / $statistics->totalRatingCount * 10000) / 10000)}}
現在のスコアデータのうち、最大レート({{$statistics->potentialRatingTop}})の曲でリーセント枠を全て埋めたときの値です。 @foreach ($messages as $message)

From 9da42f3c71022cfd5a8c40c796a7587150de0c59 Mon Sep 17 00:00:00 2001 From: slime-hatena Date: Fri, 8 Mar 2024 01:47:10 +0900 Subject: [PATCH 3/3] Run ci