mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
fix: referral network rendering — portal fix and visual tuning
Portal to document.body escapes main's contain:content which broke fixed positioning (container had height:0 and was clipped to main). Visual fixes for 662+ node graphs: - labels only on large nodes (threshold 6→14, density 0.5→0.12) - leaf nodes 5px, referrers 10px, campaigns 16px - edge opacity reduced to prevent white starburst - default edge color opacity lowered
This commit is contained in:
@@ -46,8 +46,7 @@ export function getUserNodeColor(
|
||||
* Size is proportional to direct_referrals, clamped between min and max.
|
||||
*/
|
||||
export function getUserNodeSize(directReferrals: number): number {
|
||||
const MIN_SIZE = 12;
|
||||
const MAX_SIZE = 50;
|
||||
if (directReferrals === 0) return MIN_SIZE;
|
||||
return Math.min(MAX_SIZE, MIN_SIZE + Math.sqrt(directReferrals) * 5);
|
||||
if (directReferrals === 0) return 5;
|
||||
if (directReferrals <= 2) return 10;
|
||||
return Math.min(40, 10 + Math.sqrt(directReferrals) * 4);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user