mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: scratchpad: handle duplicate click event
This commit is contained in:
1 parent
f030c32813
commit
e964eec099
3 files changed
+11
-3
No files matched your search
@@ -163,18 +163,26 @@ const page = new NamedPage(['problem_detail', 'contest_detail_problem', 'homewor
|
||||
$('.loader-container').hide();
|
||||
}
|
||||
|
||||
let progress = false;
|
||||
|
||||
async function enterScratchpadMode() {
|
||||
if (progress) return;
|
||||
progress = true;
|
||||
await extender.extend();
|
||||
await loadReact();
|
||||
renderReact();
|
||||
await scratchpadFadeIn();
|
||||
progress = false;
|
||||
}
|
||||
|
||||
async function leaveScratchpadMode() {
|
||||
if (progress) return;
|
||||
progress = true;
|
||||
await scratchpadFadeOut();
|
||||
$('.problem-content-container').append($('.problem-content'));
|
||||
await extender.collapse();
|
||||
unmountReact();
|
||||
progress = false;
|
||||
}
|
||||
|
||||
async function loadObjective() {
|
||||
|
||||
Reference in new issue
Block a user