MCPcopy Index your code
hub / github.com/plotly/plotly.js / isOnlyOnePointSelected

Function isOnlyOnePointSelected

src/components/selections/select.js:923–939  ·  view source on GitHub ↗
(searchTraces)

Source from the content-addressed store, hash-verified

921}
922
923function isOnlyOnePointSelected(searchTraces) {
924 var len = 0;
925 var searchInfo, trace, i;
926
927 for(i = 0; i < searchTraces.length; i++) {
928 searchInfo = searchTraces[i];
929 trace = searchInfo.cd[0].trace;
930 if(trace.selectedpoints) {
931 if(trace.selectedpoints.length > 1) return false;
932
933 len += trace.selectedpoints.length;
934 if(len > 1) return false;
935 }
936 }
937
938 return len === 1;
939}
940
941function updateSelectedState(gd, searchTraces, eventData) {
942 var i;

Callers 1

selectOnClickFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…