mirror of
https://github.com/philipredstone/relnet.git
synced 2025-06-16 20:51:16 +02:00
Fixed philips fixes
Took 15 minutes
This commit is contained in:
parent
581433612b
commit
f1ead87340
@ -35,9 +35,9 @@ interface CanvasGraphProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Physics constants
|
// Physics constants
|
||||||
const NODE_RADIUS = 30; // Node radius in pixels
|
const NODE_RADIUS = 45; // Node radius in pixels
|
||||||
const MIN_DISTANCE = 100; // Minimum distance between any two nodes
|
const MIN_DISTANCE = 110; // Minimum distance between any two nodes
|
||||||
const MAX_DISTANCE = 300; // Maximum distance between connected nodes
|
const MAX_DISTANCE = 500; // Maximum distance between connected nodes
|
||||||
const REPULSION_STRENGTH = 500; // How strongly nodes repel each other when too close
|
const REPULSION_STRENGTH = 500; // How strongly nodes repel each other when too close
|
||||||
const ATTRACTION_STRENGTH = 0.1; // Default attraction between connected nodes
|
const ATTRACTION_STRENGTH = 0.1; // Default attraction between connected nodes
|
||||||
const CONSTRAINT_STRENGTH = 0.2; // Strength of distance constraints
|
const CONSTRAINT_STRENGTH = 0.2; // Strength of distance constraints
|
||||||
@ -488,7 +488,8 @@ const CanvasGraph: React.FC<CanvasGraphProps> = ({ data, width, height }) => {
|
|||||||
ctx.lineWidth = 2;
|
ctx.lineWidth = 2;
|
||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
|
|
||||||
const initials = `${node.firstName.charAt(0)}${node.lastName.charAt(0)}`;
|
// Draw initials
|
||||||
|
const initials = `${node.firstName} ${node.lastName.charAt(0)}.`;
|
||||||
ctx.fillStyle = 'white';
|
ctx.fillStyle = 'white';
|
||||||
ctx.font = 'bold 16px sans-serif';
|
ctx.font = 'bold 16px sans-serif';
|
||||||
ctx.textAlign = 'center';
|
ctx.textAlign = 'center';
|
||||||
|
@ -91,7 +91,7 @@ export const PersonFormModal: React.FC<PersonFormModalProps> = ({
|
|||||||
id="birthday"
|
id="birthday"
|
||||||
selected={formData.birthday}
|
selected={formData.birthday}
|
||||||
onChange={(date: Date | null) => setFormData({ ...formData, birthday: date })}
|
onChange={(date: Date | null) => setFormData({ ...formData, birthday: date })}
|
||||||
dateFormat="MMMM d, yyyy"
|
dateFormat="dd.MM.YYYY"
|
||||||
placeholderText="Select birthday"
|
placeholderText="Select birthday"
|
||||||
className="w-full bg-slate-700 border border-slate-600 rounded-md p-2
|
className="w-full bg-slate-700 border border-slate-600 rounded-md p-2
|
||||||
focus:outline-none focus:ring-2 focus:ring-indigo-500 text-white"
|
focus:outline-none focus:ring-2 focus:ring-indigo-500 text-white"
|
||||||
@ -337,7 +337,7 @@ export const PersonDetailModal: React.FC<PersonDetailModalProps> = ({
|
|||||||
id="editBirthday"
|
id="editBirthday"
|
||||||
selected={person.birthday ? new Date(person.birthday) : null}
|
selected={person.birthday ? new Date(person.birthday) : null}
|
||||||
onChange={(date: Date | null) => setPerson({ ...person, birthday: date })}
|
onChange={(date: Date | null) => setPerson({ ...person, birthday: date })}
|
||||||
dateFormat="MMMM d, yyyy"
|
dateFormat="dd.MM.YYYY"
|
||||||
placeholderText="Select birthday"
|
placeholderText="Select birthday"
|
||||||
className="w-full bg-slate-700 border border-slate-600 rounded-md p-2
|
className="w-full bg-slate-700 border border-slate-600 rounded-md p-2
|
||||||
focus:outline-none focus:ring-2 focus:ring-indigo-500 text-white"
|
focus:outline-none focus:ring-2 focus:ring-indigo-500 text-white"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user