Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/components/Sing/ScoreSequencer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ const onMouseUp = (event: MouseEvent) => {
}

if (isRectSelecting.value) {
rectSelect();
rectSelect(isOnCommandOrCtrlKeyDown(event));
return;
}

Expand All @@ -821,7 +821,11 @@ const onMouseUp = (event: MouseEvent) => {
nowPreviewing.value = false;
};

const rectSelect = () => {
/**
* 矩形選択。
* @param additive 追加選択とするかどうか。
*/
const rectSelect = (additive: boolean) => {
const rectSelectHitboxElement = rectSelectHitbox.value;
if (!rectSelectHitboxElement) {
throw new Error("rectSelectHitboxElement is null.");
Expand Down Expand Up @@ -855,7 +859,9 @@ const rectSelect = () => {
noteIdsToSelect.push(note.id);
}
}
store.dispatch("DESELECT_ALL_NOTES");
if (!additive) {
store.dispatch("DESELECT_ALL_NOTES");
}
store.dispatch("SELECT_NOTES", { noteIds: noteIdsToSelect });
};

Expand Down