Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
1699aee
feat: add drag and drag-end events to BrushTracker
jobo322 Oct 16, 2026
4a68a02
chore: do not export the types and interface because it is consumed by
jobo322 Oct 19, 2026
5faa011
fix: expose click claim API to core operator chart slots
jobo322 Oct 20, 2026
eeda8e3
fix: require pointer travel to mark gesture as drag
jobo322 Oct 20, 2026
40abbc2
feat: forward live preview state to operator chart slots
jobo322 Oct 20, 2026
1a5997d
feat: render operator left content in the edition banner
jobo322 Oct 20, 2026
1f1d2d8
fix: compare pointer travel in container coordinates
jobo322 Oct 20, 2026
fb28e6c
fix: gate brush move dispatch behind drag threshold
jobo322 Oct 20, 2026
3749484
feat: expose the primary key state to the operator chart slots
jobo322 Oct 29, 2026
dba0777
ci: update playwright
tpoisseau Nov 3, 2026
a54e473
Revert "ci: update playwright"
tpoisseau Nov 3, 2026
9f01aa8
fix(1d): enable zoom brush when the primary key is activated
jobo322 Nov 4, 2026
3d304e2
chore: update @zakodium and nmr-processing packages
jobo322 Nov 6, 2026
c385030
chore: update package-lock.json and fix one eslint error
jobo322 Nov 6, 2026
6de65a1
chore: fix prettier
hamed-musallam Nov 10, 2026
964aa2e
fix: resolve ESLint regressions without changing runtime behavior
hamed-musallam Nov 10, 2026
4a783f9
chore: fix eslint
hamed-musallam Nov 10, 2026
e3edb1f
Revert "fix: resolve ESLint regressions without changing runtime beha…
hamed-musallam Nov 10, 2026
cc59265
Revert "chore: fix eslint"
hamed-musallam Nov 10, 2026
165cbef
chore: revert unrelated dep updates
targos Nov 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 33 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@
"@tanstack/react-form": "^1.33.5",
"@tanstack/react-store": "^0.11.2",
"@tanstack/react-table": "^9.2.6",
"@zakodium/nmr-types": "^0.5.32",
"@zakodium/nmrium-core": "^0.7.82",
"@zakodium/nmrium-core-plugins": "^0.7.119",
"@zakodium/nmr-types": "^0.5.34",
"@zakodium/nmrium-core": "^0.7.83",
"@zakodium/nmrium-core-plugins": "^0.7.121",
"@zakodium/pdnd-esm": "^1.2.0",
"@zakodium/utils": "^0.5.1",
"@zakodium/utils": "^0.7.0",
"@zip.js/zip.js": "^2.23.0",
"cheminfo-font": "^1.28.0",
"cheminfo-types": "^1.16.0",
Expand Down
7 changes: 5 additions & 2 deletions src/component/1d/BrushTracker1D.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,12 @@ export function BrushTracker1D({ children }: Required<PropsWithChildren>) {
}

const tools = new Set<Tool>(['zoom']);
// The region zoom is the tool action of the zoom tool, so it follows
// the `general.invert` preference like the other tools' actions: it
// is enabled when the primary key is activated (with `invert: false`
// that means SHIFT + drag, with `invert: true` a plain drag).
const isDefaultBrushEnabled =
!tools.has(selectedTool) ||
(tools.has(selectedTool) && !brushData.shiftKey);
!tools.has(selectedTool) || (tools.has(selectedTool) && isPrimary);

if (!shouldExecuteDefaultAction || selectedTool == null) {
return;
Expand Down
2 changes: 2 additions & 0 deletions src/component/1d/plugin_chart_brush_tracker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ export function PluginChartBrushTracker() {
if (!operatorUI) return null;

const isLiveEditable = operatorUI?.isLiveEditable ?? false;
const isLivePreview = isLiveEditable && (liveEdit.value?.checked ?? false);

return (
<CoreOperatorChartBrushTracker
core={core}
operatorUI={operatorUI}
spectrum={spectrum}
operation={liveOperation}
isLivePreview={isLivePreview}
height={height}
width={width}
margin={margin}
Expand Down
21 changes: 20 additions & 1 deletion src/component/1d/plugin_svg_chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import { useChartData } from '../context/ChartContext.tsx';
import { useCore } from '../context/CoreContext.tsx';
import type { ScaleLinearNumberFunction } from '../context/ScaleContext.tsx';
import { useScaleChecked } from '../context/ScaleContext.tsx';
import { useProcessingsMutations } from '../context/processings_mutations_context.tsx';
import { useIndicatorLineColor } from '../hooks/useIndicatorLineColor.ts';
import useSpectrum from '../hooks/useSpectrum.ts';
import { useVerticalAlign } from '../hooks/useVerticalAlign.ts';
import { useLiveEdit } from '../panels/filtersPanel/processings/use_live_edit.ts';
import { useLiveOperation } from '../panels/filtersPanel/processings/use_live_operation.ts';
import { CoreOperatorChartSVG } from '../utility/core_slots/core_operator_chart_svg.tsx';

Expand All @@ -17,7 +19,9 @@ export function PluginSVGChart1D() {
const core = useCore();
const spectrum = useSpectrum();
const { height, width, margin } = useChartData();
const [liveOperation] = useLiveOperation();
const [liveOperation, setLiveOperation] = useLiveOperation();
const liveEdit = useLiveEdit(liveOperation?.uid);
const processingsMutations = useProcessingsMutations();
const { scaleX: scaleXBuilder } = useScaleChecked();
const indicatorLineColor = useIndicatorLineColor();

Expand All @@ -31,12 +35,27 @@ export function PluginSVGChart1D() {
const operatorUI = core.slotOperator(liveOperation.operatorId);
if (!operatorUI) return null;

const isLiveEditable = operatorUI?.isLiveEditable ?? false;
const isLivePreview = isLiveEditable && (liveEdit.value?.checked ?? false);

return (
<CoreOperatorChartSVG
core={core}
operatorUI={operatorUI}
spectrum={spectrum}
operation={liveOperation}
isLivePreview={isLivePreview}
onChange={(liveOperation) => {
liveOperation = setLiveOperation(liveOperation);

if (!isLiveEditable) return;
if (!liveEdit.value?.checked) return;

void processingsMutations.applyLiveChange(
liveOperation,
liveEdit.value?.shouldProcessNext ?? false,
);
}}
height={height}
width={width}
margin={margin}
Expand Down
Loading
Loading