Skip to content

Commit

Permalink
Change: ズームのControlをrangeにする
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenc-nanashi committed Nov 21, 2024
1 parent 6441c05 commit 23a32e1
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/components/Sing/SequencerGrid/index.stories.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import type { Meta, StoryObj } from "@storybook/vue3";

import Presentation from "./Presentation.vue";
import {
ZOOM_X_MAX,
ZOOM_X_MIN,
ZOOM_X_STEP,
ZOOM_Y_MAX,
ZOOM_Y_MIN,
ZOOM_Y_STEP,
} from "@/sing/viewHelper";

const meta: Meta<typeof Presentation> = {
component: Presentation,
Expand All @@ -18,6 +26,24 @@ const meta: Meta<typeof Presentation> = {
sequencerSnapType: 16,
numMeasures: 32,
},
argTypes: {
sequencerZoomX: {
control: {
type: "range",
min: ZOOM_X_MIN,
max: ZOOM_X_MAX,
step: ZOOM_X_STEP,
},
},
sequencerZoomY: {
control: {
type: "range",
min: ZOOM_Y_MIN,
max: ZOOM_Y_MAX,
step: ZOOM_Y_STEP,
},
},
},

render: (args) => ({
components: { Presentation },
Expand Down
11 changes: 11 additions & 0 deletions src/components/Sing/SequencerRuler/index.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { ref } from "vue";

import Presentation from "./Presentation.vue";
import { UnreachableError } from "@/type/utility";
import { ZOOM_X_MIN, ZOOM_X_MAX, ZOOM_X_STEP } from "@/sing/viewHelper";

const meta: Meta<typeof Presentation> = {
component: Presentation,
Expand Down Expand Up @@ -31,6 +32,16 @@ const meta: Meta<typeof Presentation> = {

// TODO: ContextMenuをDIする
},
argTypes: {
sequencerZoomX: {
control: {
type: "range",
min: ZOOM_X_MIN,
max: ZOOM_X_MAX,
step: ZOOM_X_STEP,
},
},
},
render: (args) => ({
components: { Presentation },
setup() {
Expand Down

0 comments on commit 23a32e1

Please sign in to comment.