feat: new tool for 2D alignment - #4310
Open
hamed-musallam wants to merge 13 commits into
Open
Conversation
Replace the single allowTools Set (which only supported showing/hiding the crossline based on "not brushing") with a toolsVisibility map that supports three states per tool: 'always', 'onlyBrushing', and 'onlyNotBrushing'
Deploying nmrium with
|
| Latest commit: |
38e9210
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://09f540d8.nmrium.pages.dev |
| Branch Preview URL: | https://calibration-of-2d-spectra.nmrium.pages.dev |
hamed-musallam
force-pushed
the
calibration-of-2d-spectra
branch
2 times, most recently
from
August 13, 2026 09:49
b2b8c3c to
57dfe74
Compare
Primary detection previously matched a compound 'shift[<boolean>]_ctrl[<boolean>]_alt[<boolean>]' string against a hardcoded identifier, so holding an unrelated modifier (e.g. alt, used for axis-aligned actions) alongside shift incorrectly deactivated primary. - Remove PrimaryKey/getPrimaryKey compound-string matching. - Add isPrimaryActive(modifiers, invert): checks only the required modifiers, ignoring any others. - Add PRIMARY_MODIFIERS (['shiftKey']) as the source of truth for what defines primary.
… map Replace the flat allowTools Set with a tool visibility rule map `TOOL_VISIBILITY_RULES` and a `isBrushAllowed(selectedTool, isPrimary)` function. Each tool now declares one of 'primary', 'non-primary', or 'always' to control BrushXY visibility based on primary action state, instead of a single boolean allow check.
refactor: restore last zoom domain
Apply x/y translation to Contours based on brush drag delta when the 2d alignment tool is active.
hamed-musallam
force-pushed
the
calibration-of-2d-spectra
branch
from
August 13, 2026 10:49
e4ca6a4 to
68cb2ac
Compare
hamed-musallam
force-pushed
the
calibration-of-2d-spectra
branch
from
August 13, 2026 13:49
4ea2d02 to
04185ab
Compare
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.
No description provided.