Repository navigation
feat: add drag and drag-end events to BrushTracker - #4413
Merged
Merged
Conversation
Deploying nmrium with
|
| Latest commit: |
165cbef
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://084515fa.nmrium.pages.dev |
| Branch Preview URL: | https://feat-brush-tracker-drag-even.nmrium.pages.dev |
jobo322
force-pushed
the
feat/brush-tracker-drag-events
branch
from
October 20, 2026 19:24
e066211 to
6229644
Compare
jobo322
force-pushed
the
feat/brush-tracker-drag-events
branch
2 times, most recently
from
November 6, 2026 16:16
f31d2ff to
c0b91e5
Compare
- Extend BrushTrackerProps with onDrag/onDragEnd and a DragTrackerEvent payload (chart-relative coordinates, start position, mouse button, modifier keys, domEvent and a gesture claim API). - Extend the emitter union with 'drag' | 'drag-end'. - Emit drag from the first pointermove with a pressed button (no threshold) and on every move; a consumer claim (stopPropagation) suppresses the brush dispatch for the rest of the gesture. - Extract the gesture logic to brush_tracker_drag_gesture.ts with unit tests. - Thread onChange to the operator ChartSVG slot so SVG-layer interactions (keyboard anchor deletion) can update the operation.
the contract from nmrium-core
The tracker events exposed the raw shiftKey, so operator UIs had to hard-code shift and could not follow the general.invert preference. Resolve the primary key with useMapKeyModifiers in the chart brush commons, pass it to the click and drag events, and make the default brush of the zoom tool follow the primary key too.
This reverts commit 690eae6.
The zoom tool region brush followed the raw shiftKey. With the default general.invert=true the plain drag activates the primary key, so the brush must be enabled when isPrimary is true, consistent with the other tools' actions.
hamed-musallam
force-pushed
the
feat/brush-tracker-drag-events
branch
from
November 10, 2026 08:28
c0b91e5 to
c385030
Compare
- Override typescript-eslint to 8.71.0 to avoid false link deprecations - Preserve inset scroll delta fallback while satisfying lint - Update package lockfile
targos
reviewed
Nov 10, 2026
targos
reviewed
Nov 10, 2026
Member
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: add drag and drag-end events to
BrushTrackerAdds
onDrag/onDragEndevents to theBrushTrackergesture pipeline so plugin chart slots can implement anchor dragging through the tracker event API instead of local DOM overlays.Scope and backward compatibility
This change is additive and does not modify the legacy filters pipeline:
The only functional consumer of the new API is the baseline correction operator UI in the new pipeline of processors