Skip to content

Commit

Permalink
Make default userMode edit
Browse files Browse the repository at this point in the history
  • Loading branch information
yinanazhou committed Jun 26, 2023
1 parent d755a0d commit 38b1348
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions src/SquareEdit/SingleEditMode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,13 @@ class SingleEditMode implements NeumeEditInterface {
document.getElementById(insertMode).classList.add('is-active');
document.getElementById(selectionMode).classList.add('is-active');
switch (userMode) {
case 'edit':
document.getElementById(selectionMode).click();
break;
case 'insert':
document.getElementById(insertMode).click();
break;
case 'edit':
default:
return;
document.getElementById(selectionMode).click();
break;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/TextView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class TextView implements TextViewInterface {
document.querySelectorAll('.syl.selected .sylTextRect-display')
.forEach((rect: HTMLElement) => { rect.style.fill = 'red'; });

if (this.neonView.TextEdit !== undefined) {
if (this.neonView.getUserMode() !== 'viewer' && this.neonView.TextEdit !== undefined) {
this.neonView.TextEdit.initSelectByBBoxButton();
}

Expand Down
2 changes: 1 addition & 1 deletion src/utils/LocalSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const DEFAULT_SETTINGS: Settings = {
glyphOpacity: 100,
imageOpacity: 100,
highlightMode: 'none',
userMode: 'viewer',
userMode: 'edit',
insertMode: 'punctum',
insertTab: 'primitiveTab',
selectionMode: 'selBySyllable',
Expand Down

0 comments on commit 38b1348

Please sign in to comment.