-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: SequencerGridをPresentation/Containerに分離 (#2311)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Hiroshiba <[email protected]>
- Loading branch information
1 parent
b0d8c2e
commit 428413c
Showing
5 changed files
with
86 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<template> | ||
<Presentation | ||
:tpqn | ||
:timeSignatures | ||
:sequencerZoomX | ||
:sequencerZoomY | ||
:sequencerSnapType | ||
:numMeasures | ||
/> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { computed } from "vue"; | ||
import Presentation from "./Presentation.vue"; | ||
import { useStore } from "@/store"; | ||
defineOptions({ | ||
name: "SequencerGrid", | ||
}); | ||
const store = useStore(); | ||
const tpqn = computed(() => store.state.tpqn); | ||
const timeSignatures = computed(() => store.state.timeSignatures); | ||
const sequencerZoomX = computed(() => store.state.sequencerZoomX); | ||
const sequencerZoomY = computed(() => store.state.sequencerZoomY); | ||
const sequencerSnapType = computed(() => store.state.sequencerSnapType); | ||
const numMeasures = computed(() => store.getters.SEQUENCER_NUM_MEASURES); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import type { Meta, StoryObj } from "@storybook/vue3"; | ||
|
||
import Presentation from "./Presentation.vue"; | ||
|
||
const meta: Meta<typeof Presentation> = { | ||
component: Presentation, | ||
args: { | ||
timeSignatures: [ | ||
{ | ||
beats: 4, | ||
beatType: 4, | ||
measureNumber: 1, | ||
}, | ||
], | ||
sequencerZoomX: 0.25, | ||
sequencerZoomY: 0.75, | ||
tpqn: 480, | ||
sequencerSnapType: 16, | ||
numMeasures: 32, | ||
}, | ||
|
||
render: (args) => ({ | ||
components: { Presentation }, | ||
setup() { | ||
return { args }; | ||
}, | ||
template: `<div style="width: 100vw; height: 400px; overflow: hidden;"><Presentation v-bind="args" /></div>`, | ||
}), | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof Presentation>; | ||
|
||
export const Default: Story = {}; |
Binary file added
BIN
+4.94 KB
...ト.spec.mts-snapshots/components-sing-sequencergrid--default-storybook-win32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.