MCPcopy Create free account
hub / github.com/DFin/Neural-Network-Visualisation / applySnapshotChange

Function applySnapshotChange

assets/main.js:983–991  ·  view source on GitHub ↗
(snapshot, safeIndex)

Source from the content-addressed store, hash-verified

981 };
982
983 const applySnapshotChange = async (snapshot, safeIndex) => {
984 if (typeof options.onSnapshotChange !== "function") return;
985 setLoading(true);
986 try {
987 await options.onSnapshotChange(snapshot, safeIndex);
988 } finally {
989 setLoading(false);
990 }
991 };
992
993 const setActiveIndex = async (index, { emit = false, force = false } = {}) => {
994 if (!Number.isFinite(index)) return null;

Callers 1

setActiveIndexFunction · 0.85

Calls 1

setLoadingFunction · 0.85

Tested by

no test coverage detected