mirror of
https://github.com/OFFIS-ESC/constellation-analyzer
synced 2026-01-27 07:43:41 +00:00
perf: make relation directionality changes instant
Removes the 500ms debounce delay when changing edge directionality in the right panel. Directionality toggle buttons now apply changes immediately, providing instant visual feedback. Text fields (relation type and custom label) still use debounced saves to avoid excessive updates while typing. Improves UX by making toggle interactions feel more responsive. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
7f8af78432
commit
e3e5b0768b
1 changed files with 7 additions and 2 deletions
|
|
@ -482,9 +482,14 @@ const RightPanel = ({ selectedNode, selectedEdge, onClose }: Props) => {
|
||||||
value={relationDirectionality}
|
value={relationDirectionality}
|
||||||
exclusive
|
exclusive
|
||||||
onChange={(_, newValue) => {
|
onChange={(_, newValue) => {
|
||||||
if (newValue !== null) {
|
if (newValue !== null && selectedEdge) {
|
||||||
setRelationDirectionality(newValue);
|
setRelationDirectionality(newValue);
|
||||||
setHasEdgeChanges(true);
|
// Apply directionality change instantly (no debounce)
|
||||||
|
updateEdge(selectedEdge.id, {
|
||||||
|
type: relationType,
|
||||||
|
label: relationLabel.trim() || undefined,
|
||||||
|
directionality: newValue,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
size="small"
|
size="small"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue