Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
22 changes: 11 additions & 11 deletions src/components/Sing/ScoreSequencer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ const onLyricConfirmed = (nextNoteId: NoteId | undefined) => {

// ステートマシン
const {
stateMachine,
processWithStateMachine,
previewMode,
previewNotes,
previewRectForRectSelect,
Expand Down Expand Up @@ -555,7 +555,7 @@ const getCursorPosOnSequencer = (

const onNoteBarMouseDown = (event: MouseEvent, note: Note) => {
if (state.editingLyricNoteId == undefined) {
stateMachine.process({
processWithStateMachine({
type: "mouseEvent",
targetArea: "Note",
mouseEvent: event,
Expand All @@ -573,7 +573,7 @@ const onNoteBarDoubleClick = (event: MouseEvent, note: Note) => {
) {
void store.actions.SET_EDITING_LYRIC_NOTE_ID({ noteId: note.id });
} else if (state.editingLyricNoteId == undefined) {
stateMachine.process({
processWithStateMachine({
type: "mouseEvent",
targetArea: "Note",
mouseEvent: event,
Expand All @@ -585,7 +585,7 @@ const onNoteBarDoubleClick = (event: MouseEvent, note: Note) => {

const onNoteLeftEdgeMouseDown = (event: MouseEvent, note: Note) => {
if (state.editingLyricNoteId == undefined) {
stateMachine.process({
processWithStateMachine({
type: "mouseEvent",
targetArea: "NoteLeftEdge",
mouseEvent: event,
Expand All @@ -597,7 +597,7 @@ const onNoteLeftEdgeMouseDown = (event: MouseEvent, note: Note) => {

const onNoteRightEdgeMouseDown = (event: MouseEvent, note: Note) => {
if (state.editingLyricNoteId == undefined) {
stateMachine.process({
processWithStateMachine({
type: "mouseEvent",
targetArea: "NoteRightEdge",
mouseEvent: event,
Expand All @@ -622,7 +622,7 @@ const onMouseDown = (event: MouseEvent) => {
return;
}
if (state.editingLyricNoteId == undefined) {
stateMachine.process({
processWithStateMachine({
type: "mouseEvent",
targetArea: "SequencerBody",
mouseEvent: event,
Expand All @@ -633,7 +633,7 @@ const onMouseDown = (event: MouseEvent) => {

const onMouseMove = (event: MouseEvent) => {
if (state.editingLyricNoteId == undefined) {
stateMachine.process({
processWithStateMachine({
type: "mouseEvent",
targetArea: "Window",
mouseEvent: event,
Expand All @@ -644,7 +644,7 @@ const onMouseMove = (event: MouseEvent) => {

const onMouseUp = (event: MouseEvent) => {
if (state.editingLyricNoteId == undefined) {
stateMachine.process({
processWithStateMachine({
type: "mouseEvent",
targetArea: "Window",
mouseEvent: event,
Expand All @@ -655,7 +655,7 @@ const onMouseUp = (event: MouseEvent) => {

const onDoubleClick = (event: MouseEvent) => {
if (state.editingLyricNoteId == undefined) {
stateMachine.process({
processWithStateMachine({
type: "mouseEvent",
targetArea: "SequencerBody",
mouseEvent: event,
Expand Down Expand Up @@ -760,7 +760,7 @@ const handleNotesBackspaceOrDelete = () => {
};

const handleKeydown = (event: KeyboardEvent) => {
stateMachine.process({
processWithStateMachine({
type: "keyboardEvent",
targetArea: "Document",
keyboardEvent: event,
Expand Down Expand Up @@ -796,7 +796,7 @@ const handleKeydown = (event: KeyboardEvent) => {
};

const handleKeyUp = (event: KeyboardEvent) => {
stateMachine.process({
processWithStateMachine({
type: "keyboardEvent",
targetArea: "Document",
keyboardEvent: event,
Expand Down
3 changes: 2 additions & 1 deletion src/composables/useSequencerStateMachine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useCommandOrControlKey, useShiftKey } from "./useModifierKey";
import {
ComputedRefs,
IdleStateId,
Input,
PartialStore,
Refs,
} from "@/sing/sequencerStateMachine/common";
Expand Down Expand Up @@ -74,7 +75,7 @@ export const useSequencerStateMachine = (store: PartialStore) => {
});

return {
stateMachine,
processWithStateMachine: (input: Input) => stateMachine.process(input),
previewMode: computed(() => refs.previewMode.value),
previewNotes: computed(() => refs.previewNotes.value),
previewRectForRectSelect: computed(
Expand Down