-
Notifications
You must be signed in to change notification settings - Fork 336
feat: ソング:カーソルをシーケンサーの端に持っていったときにスクロールする機能を追加(#2319) #2583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🚀 プレビュー用ページを作成しました 🚀 更新時点でのコミットハッシュ: |
draft PRありがとうございます! ステートマシンが実装されてコードが移動しました! たぶん今回の変更箇所は |
PRありがとうございます! スクロールはHTML要素に対して( なので、「マウスドラッグ中のオートスクロールを有効にするかどうか」のフラグをステートマシンで扱うように( |
Stateパターンの修正点について、確認してますので少々お待ちください……… |
@sigprogramming @Hiroshiba |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
コードはまだ見れてないのですが、挙動は良い感じに思いました!!!
setIntervalではなくrequestAnimationFrameを使うとより良いかもです!
こっちはコールバックの第一引数にtimestampが来るので、実際にかかった時間を計算できるはず。
なので速度×時間
で移動量を割り出せるので、ちょっとラグい環境でも使いやすい・・・かも・・・?
(setInterval
のように何度も呼んでくれないので再帰呼び出しが必要になりますが。VOICEVOXのコード内でも結構requestAnimationFrame
使ってる箇所あるので参考になるかもです!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
コンフリクト解消&修正ありがとうございます!
@sigprogramming @Hiroshiba |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
変更ありがとうございます!
試してみて、スクロールスピードはもう少し速くても良いかもと感じました!
端の判定も、もう少し広くとっても良いかも!
@sigprogramming |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
変更ありがとうございます!
スクロールスピードはあと少し早くても良いかもです、試してみて0.3くらいが良さそうに感じました!
また、ノート追加時とノートリサイズ時も自動スクロールされると便利かもです!
(moveNoteState.ts
と同様に、addNoteState.ts
、resizeNoteLeftState.ts
、resizeNoteRightState.ts
を変更することで実現できると思います)
確かに便利そうですね! 追加してみます |
@sigprogramming |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
動作も問題なさそうです!
以下を行いました。
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!!
細かい点をコメントしました!
マージボタン押せると思うので良い感じになったら押していただければ・・・!
(変更した後心配でしたらコメントなどいただければ 🙏 )
@terapotan さんもありがとうございました!!
@sigprogramming |
少し調整を行ってからマージします! |
@Hiroshiba |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@terapotan |
あっそうか @tarepan さんの方にPR行ってしまいますね。。すみません!!! お忙しいところご迷惑かけてしまうのも申し訳ないので、別でvoicevoxに向けてPR作ろうと思います! ということでこのPRはマージさせていただきます!! |
@Hiroshiba |
あっっっ間違えてしまいました。。お二人ともすみません。。。🙇🙇🙇 |
ちょっと相談が! ニーズのある機能が実装されたときにSNSで言及しておりまして、今回の機能が実装されたこともポストしたいと思っています。 ちなみにこんな感じを予定しています・・・!
|
@Hiroshiba |
ポストさせていただきました!! ありがとうございました!! 🙏 |
内容
カーソルをシーケンサーの端に持っていったときにスクロールする機能を暫定で追加してみました。
暫定ですので、以下の機能がまだ実装されていません。
特に2番に関して、マウスカーソルがシーケンサーの範囲外にあったときに、常に移動するように実装するには、previewMove以外のイベントに上記スクロール機能を実装する必要があり、現状どのイベントに実装すればいいか分かっていない状況です。
詳細な仕様含め、一度話し合ったほうがいいかなと思っています。
関連 Issue
ref #2319
スクリーンショット・動画など
その他