Skip to content

Commit

Permalink
fix(gui): get tile orders from server params
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Feb 12, 2023
1 parent 3a29082 commit 0356c31
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion api/params.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@
},
"tileOrder": {
"default": "spiral",
"keys": []
"keys": [
"grid",
"spiral"
]
},
"top": {
"default": 0,
Expand Down
6 changes: 5 additions & 1 deletion gui/src/components/tab/Inpaint.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,11 @@ export function Inpaint() {
tileOrder: e.target.value,
});
}}
>{['grid', 'kernel', 'spiral'].map((name) => <MenuItem key={name} value={name}>{name}</MenuItem>)}</Select>
>
{params.tileOrder.keys.map((name) =>
<MenuItem key={name} value={name}>{name.toLocaleUpperCase()}</MenuItem>)
}
</Select>
</FormControl>
<Stack direction='row' spacing={2}>
<FormControlLabel
Expand Down

0 comments on commit 0356c31

Please sign in to comment.