|
18 | 18 | graphWorkspace: '', |
19 | 19 | graphData: null, |
20 | 20 | graphDataMode: 'overview', |
| 21 | + graphDataPreset: 'galaxy', |
21 | 22 | graphDataIncludeCode: false, |
22 | 23 | graphDataShowUnlinked: false, |
23 | 24 | graphDataAsOf: null, |
|
1142 | 1143 | state.workspace = name; |
1143 | 1144 | state.graphWorkspace = ''; |
1144 | 1145 | state.graphData = null; |
| 1146 | + state.graphDataPreset = 'galaxy'; |
1145 | 1147 | state.graphDataIncludeCode = false; |
1146 | 1148 | state.graphDataShowUnlinked = false; |
1147 | 1149 | state.graphDataRepo = ''; |
|
3490 | 3492 | state.graphData = data; |
3491 | 3493 | state.graphWorkspace = targetWorkspace; |
3492 | 3494 | state.graphDataMode = targetMode; |
| 3495 | + state.graphDataPreset = byId('graph-preset').value; |
3493 | 3496 | state.graphDataIncludeCode = responseIncludeCode; |
3494 | 3497 | state.graphDataShowUnlinked = targetShowUnlinked; |
3495 | 3498 | state.graphDataAsOf = targetAsOf; |
|
3531 | 3534 | : fullGraph && (error.status === 413 || error.code === 'GRAPH_CAPACITY') |
3532 | 3535 | ? `All nodes exceed the server capacity. Enter an exact repository filter or reduce the workspace graph. (${error.message})` |
3533 | 3536 | : `Graph unavailable: ${error.message}. Choose Reload data to try again.`; |
3534 | | - if (state.graphData && state.graphDataMode !== targetMode) { |
3535 | | - state.graphMode = state.graphDataMode; |
| 3537 | + if (state.graphData) { |
| 3538 | + if (state.graphDataMode !== targetMode) state.graphMode = state.graphDataMode; |
| 3539 | + /* The toolbar preset changes before a replacement request begins. Restore the |
| 3540 | + committed preset together with the committed renderer so a failed Every-node |
| 3541 | + transition cannot leave aria-pressed and the active engine disagreeing. */ |
| 3542 | + byId('graph-preset').value = state.graphDataPreset || 'galaxy'; |
3536 | 3543 | updateGraphModeControls(); |
| 3544 | + syncGraphChoices(); |
3537 | 3545 | } |
3538 | 3546 | // Restore the committed renderer's freeze/overlay state. The old engine survived |
3539 | 3547 | // because we never mutated state.graphEngine on the failure path. |
|
0 commit comments