Skip to content

Commit bae4677

Browse files
committed
fix(presets): inject the current preset shown as numHiddenLayers
1 parent b9fc4ae commit bae4677

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/playground/state.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,8 @@ export class State {
242242
getHideProps (map).forEach (prop => {
243243
state[prop] = (map[prop] === 'true');
244244
});
245-
// state.numHiddenLayers = state.networkShape.length;
246-
state.numHiddenLayers = getNetworkShape (presets['2-2']).length;
245+
const currentPreset = state?.networkPreset || 'allOn';
246+
state.numHiddenLayers = getNetworkShape (presets[currentPreset]).length;
247247
if (state.seed == null) {
248248
state.seed = Math.random ().toFixed (5);
249249
}

0 commit comments

Comments
 (0)