Skip to content

Commit

Permalink
update: Remove sequence length limit and change default delimiter [PT…
Browse files Browse the repository at this point in the history
  • Loading branch information
dougmartin committed Apr 3, 2024
1 parent 3cb92bf commit 0ef359a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import "./app.scss";
type GenerationMode = "ready" | "playing" | "paused" | "stepping";

const AnyStartingState = "(any)";
const MaxLengthLimit = 25;
const AnimationDelay = 1000;

type SequenceGroup = {
Expand Down Expand Up @@ -56,7 +55,7 @@ const SequenceOutputHeader = ({ group }: { group: SequenceGroup }) => {

export const App = () => {
const [lengthLimit, setLengthLimit] = useState<number | undefined>(5);
const [delimiter, setDelimiter] = useState("");
const [delimiter, setDelimiter] = useState(" ");
const [startingState, setStartingState] = useState("");
const [sequenceGroups, setSequenceGroups] = useState<SequenceGroup[]>([]);
const [selectedNodeId, _setSelectedNodeId] = useState<string>();
Expand Down Expand Up @@ -216,7 +215,7 @@ export const App = () => {

const handleChangeLengthLimit = (e: React.ChangeEvent<HTMLInputElement>) => {
const numberValue = parseInt(e.target.value, 10);
setLengthLimit(isNaN(numberValue) ? undefined : Math.min(MaxLengthLimit, numberValue));
setLengthLimit(isNaN(numberValue) ? undefined : numberValue);
};

const handleChangeDelimiter = (e: React.ChangeEvent<HTMLInputElement>) => {
Expand Down Expand Up @@ -289,7 +288,6 @@ export const App = () => {
value={lengthLimit}
onChange={handleChangeLengthLimit}
min={1}
max={MaxLengthLimit}
disabled={disabled}
/>
</div>
Expand Down

0 comments on commit 0ef359a

Please sign in to comment.