mirror of
https://github.com/philipredstone/relnet.git
synced 2025-07-09 15:16:41 +02:00
Compare commits
2 Commits
c31b5c5b14
...
backup-bef
Author | SHA1 | Date | |
---|---|---|---|
d55e58d099 | |||
006b648dd0 |
@ -376,7 +376,7 @@ const FriendshipNetwork: React.FC = () => {
|
|||||||
// Create edges
|
// Create edges
|
||||||
const graphEdges = relationships.map(rel => {
|
const graphEdges = relationships.map(rel => {
|
||||||
const color = RELATIONSHIPS[rel.type as RELATIONSHIP_TYPES]?.color || RELATIONSHIPS.custom.color;
|
const color = RELATIONSHIPS[rel.type as RELATIONSHIP_TYPES]?.color || RELATIONSHIPS.custom.color;
|
||||||
const width = rel.type === 'partner' ? 4 : rel.type === 'familie' ? 3 : 2;
|
const width = rel.type === 'partner' ? 4 : rel.type === 'family' ? 3 : rel.type === 'acquaintance' ? 2 : 1;
|
||||||
|
|
||||||
// Highlight edges connected to selected node
|
// Highlight edges connected to selected node
|
||||||
const isHighlighted = selectedPersonId && settings.highlightConnections && (rel.source === selectedPersonId || rel.target === selectedPersonId);
|
const isHighlighted = selectedPersonId && settings.highlightConnections && (rel.source === selectedPersonId || rel.target === selectedPersonId);
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
import { useCallback, useEffect, useRef, useState } from 'react';
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
||||||
import { addPerson, getPeople, Person, removePerson, updatePerson } from '../api/people';
|
import { addPerson, getPeople, Person, removePerson, updatePerson } from '../api/people';
|
||||||
import {
|
import { addRelationship, getRelationships, removeRelationship, updateRelationship } from '../api/relationships';
|
||||||
addRelationship,
|
|
||||||
getRelationships,
|
|
||||||
removeRelationship,
|
|
||||||
updateRelationship,
|
|
||||||
} from '../api/relationships';
|
|
||||||
import { Relationship } from '../interfaces/IRelationship';
|
import { Relationship } from '../interfaces/IRelationship';
|
||||||
import { RELATIONSHIP_TYPES } from '../types/RelationShipTypes';
|
import { RELATIONSHIP_TYPES } from '../types/RelationShipTypes';
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user