We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a156d3 commit 4abfb03Copy full SHA for 4abfb03
src/ui-info.ts
@@ -1,4 +1,3 @@
1
-import { get } from "svelte/store";
2
import type { GameHistory, GameState, UIInfo } from "./public-types.ts";
3
4
export function useUI(state: GameState, history: GameHistory): UIInfo {
@@ -8,8 +7,8 @@ export function useUI(state: GameState, history: GameHistory): UIInfo {
8
7
copy: state.usage.copy,
9
paste: state.usage.paste,
10
cut: state.usage.cut,
11
- undo: history.tree.length - 1 - history.index,
12
- redo: history.index,
+ undo: history.index / 2,
+ redo: (history.tree.length - 1 - history.index) / 2,
13
paused: state.paused,
14
};
15
}
0 commit comments