Skip to content

Commit

Permalink
スタイルやツールパレットの修正
Browse files Browse the repository at this point in the history
  • Loading branch information
romot-co committed Nov 23, 2024
1 parent 79b8c86 commit 170e920
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
4 changes: 3 additions & 1 deletion src/components/Sing/SequencerNote.vue
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ const onLeftEdgeMouseDown = (event: MouseEvent) => {
// カーソルの状態
.note {
&.cursor-draw,
&.cursor-ew-resize,
&.cursor-crosshair,
&.cursor-move,
Expand All @@ -527,7 +528,8 @@ const onLeftEdgeMouseDown = (event: MouseEvent) => {
}
}
&.cursor-draw:not(.edit-pitch):not(.adding) {
// ノートの編集の場合かつ追加中でない場合はノートバーをドラッグできる
&.cursor-draw.edit-note:not(.adding) {
.note-bar {
cursor: move;
}
Expand Down
14 changes: 2 additions & 12 deletions src/components/Sing/SequencerToolPalette.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,25 +78,15 @@
</template>

<script setup lang="ts">
import { useStore } from "@/store";
import { SequencerEditTarget, NoteEditTool, PitchEditTool } from "@/store/type";
// TODO: storeをコンポーネント内で定義するのは避ける
const store = useStore();
defineProps<{
editTarget: SequencerEditTarget;
selectedNoteTool: NoteEditTool;
selectedPitchTool: PitchEditTool;
onNoteToolChange: (tool: NoteEditTool) => void;
onPitchToolChange: (tool: PitchEditTool) => void;
}>();
const onNoteToolChange = (tool: NoteEditTool) => {
void store.actions.SET_SELECTED_NOTE_TOOL({ selectedNoteTool: tool });
};
const onPitchToolChange = (tool: PitchEditTool) => {
void store.actions.SET_SELECTED_PITCH_TOOL({ selectedPitchTool: tool });
};
</script>

<style scoped lang="scss">
Expand Down

0 comments on commit 170e920

Please sign in to comment.