diff --git a/src/components/app.scss b/src/components/app.scss index e241817..700c7f8 100644 --- a/src/components/app.scss +++ b/src/components/app.scss @@ -107,6 +107,12 @@ } } + label { + display: block; + white-space: nowrap; + font-weight: bold; + } + .generate { display: flex; flex-direction: column; @@ -118,12 +124,6 @@ flex-direction: column; gap: 5px; - label { - display: block; - white-space: nowrap; - font-weight: bold; - } - select { padding: 2px; width: 100%; diff --git a/src/components/app.tsx b/src/components/app.tsx index 872d60c..2ece63a 100644 --- a/src/components/app.tsx +++ b/src/components/app.tsx @@ -116,7 +116,7 @@ export const App = () => { } }, [sequenceGroups]); - const graphEmpty = useCallback(() => graph.nodes.length === 0, [graph]); + const graphEmpty = useMemo(() => graph.nodes.length === 0, [graph]); const generateNewSequence = useCallback(async () => { currentSequence.current = []; @@ -274,7 +274,7 @@ export const App = () => { }, [generateNewSequence, animateCurrentSequenceIndex, startAnimationInterval]); const uiForGenerate = () => { - const disabled = graphEmpty(); + const disabled = graphEmpty; const playLabel = generationMode === "playing" ? "Pause" : (generationMode === "paused" ? "Resume" : "Play"); const PlayOrPauseIcon = generationMode === "playing" ? PauseIcon : PlayIcon; const onPlayClick = generationMode === "playing" @@ -346,6 +346,7 @@ export const App = () => { const disabled = sequenceGroups.length === 0; return (
- This plugin generates sequences of text using a Markov chain. The plugin uses a Markov chain built from a - dataset in CODAP. The dataset must have a column of states. The plugin will build a Markov chain from the - states, and then allow generation of a sequence of text using the Markov chain. -
-- To use the plugin, first drag an attribute into the plugin. -
-+ This plugin generates sequences of text using a Markov chain. The plugin uses a Markov chain built from a + dataset in CODAP. The dataset must have a column of states. The plugin will build a Markov chain from the + states, and then allow generation of a sequence of text using the Markov chain. +
++ To use the plugin, first drag an attribute into the plugin. +
+