Skip to content

feat: new tool for 2D alignment - #4310

Open
hamed-musallam wants to merge 13 commits into
mainfrom
calibration-of-2d-spectra
Open

feat: new tool for 2D alignment#4310
hamed-musallam wants to merge 13 commits into
mainfrom
calibration-of-2d-spectra

Conversation

@hamed-musallam

Copy link
Copy Markdown
Member

No description provided.

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'
@hamed-musallam hamed-musallam linked an issue Aug 13, 2026 that may be closed by this pull request
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 13, 2026

Copy link
Copy Markdown

Deploying nmrium with  Cloudflare Pages  Cloudflare Pages

Latest commit: 38e9210
Status: ✅  Deploy successful!
Preview URL: https://09f540d8.nmrium.pages.dev
Branch Preview URL: https://calibration-of-2d-spectra.nmrium.pages.dev

View logs

@hamed-musallam
hamed-musallam force-pushed the calibration-of-2d-spectra branch 2 times, most recently from b2b8c3c to 57dfe74 Compare August 13, 2026 09:49
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.
Apply x/y translation to Contours based on brush drag delta when
the 2d alignment tool is active.
@hamed-musallam
hamed-musallam force-pushed the calibration-of-2d-spectra branch from e4ca6a4 to 68cb2ac Compare August 13, 2026 10:49
@hamed-musallam
hamed-musallam force-pushed the calibration-of-2d-spectra branch from 4ea2d02 to 04185ab Compare August 13, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Calibration of 2D spectra

1 participant