()
| 1930 | } |
| 1931 | |
| 1932 | function pushHistory() { |
| 1933 | if (historyLocked) return; |
| 1934 | const snap = deepCloneState(); |
| 1935 | history = history.slice(0, historyIndex + 1); |
| 1936 | history.push(snap); |
| 1937 | historyIndex = history.length - 1; |
| 1938 | updateUndoRedoButtons(); |
| 1939 | } |
| 1940 | |
| 1941 | function updateUndoRedoButtons() { |
| 1942 | undoBtn.disabled = historyIndex <= 0; |
no test coverage detected