SNAP event should support snapPoint(s)
See original GitHub issueLike the issue #53 , Is there a way to know the snapPoint
that triggers the SNAP
event?
I want to perform an action whenever the snapPoint
changes.
I thought of triggering the action after ref.current.snapTo()
but I realized dragging also fires the SNAP
event.
Thanks for the library!
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Setting the Snap Point - Steinberg Help
The snap point for an event is displayed as a vertical line in the Project window. Note. You can also set the snap...
Read more >The set event snap point is not at the event start position
When the output audio is re imported into the audio project, the set event snap point is not at the event start position,...
Read more >Snapping events and options enhancements for 4.x
Emit events when a snap is about to occur. Properties should include the location of the cursor, the snap point, the target layer, ......
Read more >How to Use the Snap Function in Cubase | Q&A with Greg Ondo
What is the snap function available Cubase and how can it help you? Well Greg's there to elaborate on editing based on snap....
Read more >Event Snap Point In Cubase - YouTube
How to use the Event Snap Point in Cubase to move audio events while aligning to beats and bars. ... Your browser can...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You’re welcome 🙂
I’ll think about it, I don’t want to increase the complexity too much yet as I got some other ideas I want to explore first.
For now you could store a reference to the snap points yourself, and keep track of any other variable you need:
The
snapPoints
function is always called whenever any of its arguments changes. The only thing to remember is that the real snap points are filtered and do not contain illegal variables. In most cases this isn’t a problem, but should it turn out to be you could use thedefaultSnap
function to accesssnapPoints
:Oh I didn’t see that, thanks. Okay what about accessing the defined
snapPoints
? Supposing mysnapPoints
are derived from themaxHeight
andheaderHeight
, And I need to compare them in theSNAP
event to the current snapPoint.If I store the defined
snapPoints
in state, I’ll have to always update it whenever the sheet resizes I guess.Maybe you could also expose the other params
minHeight
,maxHeight
,footerHeight
the same way as theheight
? Or even thesnapPoints
in a getter function.