@@ -29,7 +29,6 @@ import {
2929import {
3030 createRepoRadiusScale ,
3131 createContributorRadiusScale ,
32- createRemainingContributorRadiusScale ,
3332 createLinkDistanceScale ,
3433 createLinkWidthScale
3534} from './config/scales.js' ;
@@ -57,8 +56,7 @@ import {
5756import {
5857 runOwnerSimulation ,
5958 runContributorSimulation ,
60- runCollaborationSimulation ,
61- runRemainingSimulation
59+ runCollaborationSimulation
6260} from './simulations/index.js' ;
6361import {
6462 createFilterState ,
@@ -175,7 +173,7 @@ const createContributorNetworkVisual = (
175173 let visibleContributors ;
176174
177175 // Datasets
178- let contributors , remainingContributors ;
176+ let contributors ;
179177 let repos ;
180178 let nodes = [ ] ,
181179 nodes_central ;
@@ -192,13 +190,11 @@ const createContributorNetworkVisual = (
192190 // These are kept in sync with interactionState and delaunayData object
193191 let delaunay ;
194192 let nodes_delaunay ;
195- let delaunay_remaining ;
196-
193+
197194 // Helper to sync local variables with delaunayData
198195 function syncDelaunayVars ( delaunayData ) {
199196 delaunay = delaunayData . delaunay ;
200197 nodes_delaunay = delaunayData . nodesDelaunay ;
201- delaunay_remaining = delaunayData . delaunayRemaining ;
202198 }
203199
204200 /////////////////////////////////////////////////////////////////
@@ -218,7 +214,6 @@ const createContributorNetworkVisual = (
218214 const MAX_CONTRIBUTOR_WIDTH = LAYOUT . maxContributorWidth ; // The maximum width (at SF = 1) of the contributor name before it gets wrapped
219215 const CONTRIBUTOR_PADDING = contributor_padding ; // The padding between the contributor nodes around the circle (at SF = 1)
220216
221- let REMAINING_PRESENT = false ; // Is the dataset of remaining contributors present?
222217
223218 /////////////////////////////////////////////////////////////////
224219 ///////////////////////////// Colors ////////////////////////////
@@ -332,7 +327,6 @@ const createContributorNetworkVisual = (
332327
333328 // Based on the number of commits to the central repo
334329 const scale_contributor_radius = createContributorRadiusScale ( d3 ) ;
335- const scale_remaining_contributor_radius = createRemainingContributorRadiusScale ( d3 ) ;
336330
337331 const scale_link_distance = createLinkDistanceScale ( d3 ) ;
338332
@@ -355,27 +349,16 @@ const createContributorNetworkVisual = (
355349 // Initialize filters to show all
356350 applyFilters ( ) ;
357351
358- // contributors, repos, links are now set by applyFilters
359- if ( values [ 3 ] ) {
360- // Check if there is a column called "author_name" in the dataset
361- if ( values [ 3 ] [ 0 ] . author_name !== undefined ) {
362- remainingContributors = values [ 3 ] ;
363- REMAINING_PRESENT = true ;
364- } // if
365- } // if
366-
367352 // Prepare data using extracted module
368353 const prepared = prepareData (
369354 {
370355 contributors,
371356 repos,
372- links,
373- remainingContributors : REMAINING_PRESENT ? remainingContributors : [ ]
357+ links
374358 } ,
375359 {
376360 d3,
377361 REPO_CENTRAL ,
378- REMAINING_PRESENT ,
379362 COLOR_CONTRIBUTOR ,
380363 COLOR_REPO ,
381364 COLOR_OWNER ,
@@ -390,8 +373,7 @@ const createContributorNetworkVisual = (
390373 {
391374 scale_repo_radius,
392375 scale_contributor_radius,
393- scale_link_width,
394- scale_remaining_contributor_radius
376+ scale_link_width
395377 }
396378 ) ;
397379
@@ -471,26 +453,6 @@ const createContributorNetworkVisual = (
471453 ) ;
472454 // console.log("Central force simulation done")
473455
474- /////////////////////////////////////////////////////////////
475- ////// Run Force Simulation for Remaining Contributors //////
476- /////////////////////////////////////////////////////////////
477- // Run a force simulation to position the remaining contributors around the central area
478- if ( REMAINING_PRESENT ) {
479- runRemainingSimulation (
480- remainingContributors ,
481- d3 ,
482- TAU ,
483- cos ,
484- sin ,
485- max ,
486- RADIUS_CONTRIBUTOR ,
487- CONTRIBUTOR_RING_WIDTH ,
488- DEFAULT_SIZE ,
489- scale_remaining_contributor_radius
490- ) ;
491- }
492- // console.log("Remaining contributor force simulation done")
493-
494456 /////////////////////////////////////////////////////////////
495457 ////////////// Resolve String References in Links ///////////
496458 /////////////////////////////////////////////////////////////
@@ -606,12 +568,10 @@ const createContributorNetworkVisual = (
606568 PIXEL_RATIO ,
607569 SF ,
608570 nodes_delaunay,
609- delaunay,
610- delaunay_remaining
571+ delaunay
611572 } ;
612573 const data = {
613- nodes,
614- remainingContributors
574+ nodes
615575 } ;
616576
617577 // Update local variables from state object BEFORE calling handleResize
@@ -630,7 +590,6 @@ const createContributorNetworkVisual = (
630590 SF = state . SF ;
631591 nodes_delaunay = state . nodes_delaunay ;
632592 delaunay = state . delaunay ;
633- delaunay_remaining = state . delaunay_remaining ;
634593 // Now draw with updated values
635594 draw ( ) ;
636595 } ;
@@ -642,7 +601,6 @@ const createContributorNetworkVisual = (
642601 state ,
643602 data ,
644603 {
645- REMAINING_PRESENT ,
646604 d3,
647605 setDelaunay,
648606 interactionState,
@@ -657,8 +615,7 @@ const createContributorNetworkVisual = (
657615 SF = state . SF ;
658616 nodes_delaunay = state . nodes_delaunay ;
659617 delaunay = state . delaunay ;
660- delaunay_remaining = state . delaunay_remaining ;
661-
618+
662619 // Debug: Log after resize
663620 console . log ( 'chart.resize() completed' , { WIDTH , HEIGHT , SF , nodesCount : nodes . length } ) ;
664621 } ; //function resize
@@ -763,11 +720,6 @@ const createContributorNetworkVisual = (
763720 /////////////////////////////////////////////////////////////////
764721 // Extracted to src/js/simulations/collaborationSimulation.js
765722
766- /////////////////////////////////////////////////////////////////
767- ///////////// Force Simulation | Other Contributors /////////////
768- /////////////////////////////////////////////////////////////////
769- // Extracted to src/js/simulations/remainingSimulation.js
770-
771723
772724 /////////////////////////////////////////////////////////////////
773725 ///////////////////// Node Drawing Functions ////////////////////
@@ -962,10 +914,8 @@ const createContributorNetworkVisual = (
962914 set delaunay ( val ) { delaunay = val ; } ,
963915 get nodesDelaunay ( ) { return nodes_delaunay ; } ,
964916 set nodesDelaunay ( val ) { nodes_delaunay = val ; } ,
965- get delaunayRemaining ( ) { return delaunay_remaining ; } ,
966- set delaunayRemaining ( val ) { delaunay_remaining = val ; }
967917 } ;
968-
918+
969919 setupHoverInteraction ( {
970920 d3,
971921 canvasSelector : "#canvas-hover" ,
@@ -975,8 +925,6 @@ const createContributorNetworkVisual = (
975925 REPO_CENTRAL ,
976926 canvas,
977927 contextHover : context_hover ,
978- REMAINING_PRESENT ,
979- remainingContributors,
980928 setHovered,
981929 clearHover,
982930 drawHoverState,
@@ -1131,10 +1079,8 @@ const createContributorNetworkVisual = (
11311079 set delaunay ( val ) { delaunay = val ; } ,
11321080 get nodesDelaunay ( ) { return nodes_delaunay ; } ,
11331081 set nodesDelaunay ( val ) { nodes_delaunay = val ; } ,
1134- get delaunayRemaining ( ) { return delaunay_remaining ; } ,
1135- set delaunayRemaining ( val ) { delaunay_remaining = val ; }
11361082 } ;
1137-
1083+
11381084 setupClickInteraction ( {
11391085 d3,
11401086 canvasSelector : "#canvas-hover" , // Use hover canvas for clicks too since it's on top
@@ -1146,8 +1092,6 @@ const createContributorNetworkVisual = (
11461092 contextClick : context_click ,
11471093 contextHover : context_hover ,
11481094 nodes,
1149- REMAINING_PRESENT ,
1150- remainingContributors,
11511095 setClicked,
11521096 clearClick,
11531097 clearHover,
@@ -1310,7 +1254,6 @@ const createContributorNetworkVisual = (
13101254 // Reset spatial data structures (will be rebuilt in resize())
13111255 nodes_delaunay = [ ] ;
13121256 delaunay = null ;
1313- delaunay_remaining = null ;
13141257 // Note: clearDelaunay already called above via clearAll
13151258
13161259 // Apply current filters
@@ -1321,13 +1264,11 @@ const createContributorNetworkVisual = (
13211264 {
13221265 contributors,
13231266 repos,
1324- links,
1325- remainingContributors : REMAINING_PRESENT ? remainingContributors : [ ]
1267+ links
13261268 } ,
13271269 {
13281270 d3,
13291271 REPO_CENTRAL ,
1330- REMAINING_PRESENT ,
13311272 COLOR_CONTRIBUTOR ,
13321273 COLOR_REPO ,
13331274 COLOR_OWNER ,
@@ -1342,8 +1283,7 @@ const createContributorNetworkVisual = (
13421283 {
13431284 scale_repo_radius,
13441285 scale_contributor_radius,
1345- scale_link_width,
1346- scale_remaining_contributor_radius
1286+ scale_link_width
13471287 }
13481288 ) ;
13491289
@@ -1395,21 +1335,6 @@ const createContributorNetworkVisual = (
13951335 INNER_RADIUS_FACTOR
13961336 }
13971337 ) ;
1398- if ( REMAINING_PRESENT ) {
1399- runRemainingSimulation (
1400- remainingContributors ,
1401- d3 ,
1402- TAU ,
1403- cos ,
1404- sin ,
1405- max ,
1406- RADIUS_CONTRIBUTOR ,
1407- CONTRIBUTOR_RING_WIDTH ,
1408- DEFAULT_SIZE ,
1409- scale_remaining_contributor_radius
1410- ) ;
1411- }
1412-
14131338 // Resolve any remaining string references in links
14141339 links = resolveLinkReferences ( links , nodes ) ;
14151340
0 commit comments