Skip to content

Commit

Permalink
added move all to tab, fixed sudoku panel touch issue for mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
swaroopg92 committed Aug 25, 2024
1 parent b950401 commit c126925
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
6 changes: 5 additions & 1 deletion docs/js/class_panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ class Panel {
}

mode_set(mode) {
this.panelmode = mode;
if (pu.mode[pu.mode.qa].edit_mode === "sudoku" && !["number", "alphabet", "alphabet_s"].includes(mode)) {
// Don't change the mode as Sudoku mode does not support other submodes in the Panel
} else {
this.panelmode = mode;
}
this.draw_panel();
}

Expand Down
4 changes: 3 additions & 1 deletion docs/js/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,9 @@ function advancecontrol_off(loadtype) {
if (user_choices.indexOf("Box") === -1) {
document.getElementById("mo_board_lb").classList.add('is_hidden');
}
if (user_choices.indexOf("Move") === -1) {
if (user_choices.indexOf("Move All") === -1 &&
user_choices.indexOf("Move Numbers") === -1 &&
user_choices.indexOf("Move Shapes") === -1) {
document.getElementById("mo_move_lb").classList.add('is_hidden');
}
}
Expand Down
3 changes: 3 additions & 0 deletions docs/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,9 @@ onload = function() {
} else if (mode_name.includes("special")) {
pu.mode_set('special');
e.preventDefault();
} else if (mode_name.includes("move")) {
pu.mode_set('move');
e.preventDefault();
} else {
pu.mode_set('line');
e.preventDefault();
Expand Down
3 changes: 3 additions & 0 deletions docs/js/translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,7 @@ const PenpaText = {
"Line Normal", "Line Diagonal", "Line Free", "Line Middle", "Line Helper",
"Edge Normal", "Edge Diagonal", "Edge Free", "Edge Helper", "Edge Erase",
"Wall",
"Move All",
"Number Normal", "Number L", "Number M", "Number S", "Candidates", "Number 1/4", "Number Side",
"Sudoku Normal", "Sudoku Corner", "Sudoku Centre",
"Shape",
Expand All @@ -897,6 +898,7 @@ const PenpaText = {
"線 通常", "線 対角線", "線 自由線", "線 中線", "線 補助x",
"辺 通常", "辺 対角線", "辺 自由線", "辺 補助x", "辺 枠消",
"壁",
"移動 全",
"数字 通常", "数字 大", "数字 中", "数字 小", "数字 候補", "数字 1/4", "数字 辺",
"数独 通常", "数独 角", "数独 中央",
"記号",
Expand All @@ -907,6 +909,7 @@ const PenpaText = {
"sub_line1", "sub_line2", "sub_line3", "sub_line5", "sub_line4",
"sub_lineE1", "sub_lineE2", "sub_lineE3", "sub_lineE4", "sub_lineE5",
"wall",
"sub_move1",
"sub_number1", "sub_number10", "sub_number6", "sub_number5", "sub_number7", "sub_number3", "sub_number9",
"sub_sudoku1", "sub_sudoku2", "sub_sudoku3",
"symbol",
Expand Down

0 comments on commit c126925

Please sign in to comment.