You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(photomap/frontend/static/javascript/umap.js, in the cluster-info modal block). Everything else in the modal — cluster count, largest/smallest cluster, unclustered count — is computed from the module-level points array, i.e. from the clustering the map was actually drawn with. The eps is the one field that comes from somewhere else, so it can disagree with the numbers printed beside it.
Reproductions, all with the map drawn at 0.4:
Mid-debounce. Type 0.9 and open the modal inside the one-second window. It reports 0.90; the cluster counts beside it are the 0.4 clustering.
A value the spinner refuses. Type 0.005. Pausing mid-edit no longer discards the Cluster Strength #376 refuses to save it and marks the field, and the map is left alone — the modal reports 0.01, which is neither the field's 0.005 (toFixed(2) rounds it up) nor the map's 0.4.
Half-typed. Type 0. — the field's value is "", so parseFloat gives NaN and the modal reports NaN.
None of these is destructive; the modal is informational. But it is the one place in the UI that claims to say what the map was clustered with, and it is the least reliable reader of that number in the module.
Suggested fix
Have the draw record the eps it was made with — the value fetchUmapData sent, or better the value the server reports back once #380 provides it — and have the modal read that, the same way it already reads points. Then this becomes correct for #380's shrink case too, rather than needing a second fix.
Found while reviewing #376.
showClusterInfoModalreads the spinner directly:(
photomap/frontend/static/javascript/umap.js, in the cluster-info modal block). Everything else in the modal — cluster count, largest/smallest cluster, unclustered count — is computed from the module-levelpointsarray, i.e. from the clustering the map was actually drawn with. The eps is the one field that comes from somewhere else, so it can disagree with the numbers printed beside it.Reproductions, all with the map drawn at 0.4:
0.9and open the modal inside the one-second window. It reports0.90; the cluster counts beside it are the 0.4 clustering.0.005. Pausing mid-edit no longer discards the Cluster Strength #376 refuses to save it and marks the field, and the map is left alone — the modal reports0.01, which is neither the field's0.005(toFixed(2)rounds it up) nor the map's0.4.0.— the field's value is"", soparseFloatgivesNaNand the modal reportsNaN.None of these is destructive; the modal is informational. But it is the one place in the UI that claims to say what the map was clustered with, and it is the least reliable reader of that number in the module.
Suggested fix
Have the draw record the eps it was made with — the value
fetchUmapDatasent, or better the value the server reports back once #380 provides it — and have the modal read that, the same way it already readspoints. Then this becomes correct for #380's shrink case too, rather than needing a second fix.