Skip to content

Commit

Permalink
ソング:macOSでのピッチ編集結果削除の操作をcommandキーを押しながら左クリックに変更 (#2013)
Browse files Browse the repository at this point in the history
* macでのピッチ消去の操作をcommandキーを押しながら左クリックに変更

* isOnCommandOrCtrlKeyDownに

---------

Co-authored-by: Hiroshiba <[email protected]>
  • Loading branch information
sigprogramming and Hiroshiba authored Apr 25, 2024
1 parent 8d2e0eb commit 1dcb7c0
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/components/Sing/ScoreSequencer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ import { v4 as uuidv4 } from "uuid";
import ContextMenu, {
ContextMenuItemData,
} from "@/components/Menu/ContextMenu.vue";
import { isMac } from "@/type/preload";
import { useStore } from "@/store";
import { Note, SequencerEditTarget } from "@/store/type";
import {
Expand Down Expand Up @@ -1055,16 +1054,8 @@ const onMouseDown = (event: MouseEvent) => {
store.dispatch("DESELECT_ALL_NOTES");
}
} else if (editTarget.value === "PITCH") {
if (isMac) {
// Macの場合、左ボタンでDRAW、右ボタンでERASE
if (mouseButton === "LEFT_BUTTON") {
startPreview(event, "DRAW_PITCH");
} else if (mouseButton === "RIGHT_BUTTON") {
startPreview(event, "ERASE_PITCH");
}
} else if (mouseButton === "LEFT_BUTTON") {
// Mac以外の場合、左ボタンでDRAW、左ボタン+CtrlでERASE
if (event.ctrlKey) {
if (mouseButton === "LEFT_BUTTON") {
if (isOnCommandOrCtrlKeyDown(event)) {
startPreview(event, "ERASE_PITCH");
} else {
startPreview(event, "DRAW_PITCH");
Expand Down

0 comments on commit 1dcb7c0

Please sign in to comment.