1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-10 01:51:10 +09:00

graph settings

This commit is contained in:
Andrew Simachev 2024-04-17 09:01:47 +02:00
parent 65cec0ed6f
commit e189152610
No known key found for this signature in database
GPG key ID: 49A163D0D14E6FD8

View file

@ -14,7 +14,7 @@ const util = new Util();
// CONSTANTS
const transformThreshold = 1.5;
const transformThreshold = 1;
const transformThresholdHalf = transformThreshold / 2;
const delayFocus = 1000;
@ -37,10 +37,10 @@ const forceProps = {
},
charge: {
strength: -250,
distanceMax: 300,
distanceMax: 1000,
},
link: {
distance: 50,
distance: 100,
},
forceX: {
strength: 0.1,
@ -377,7 +377,7 @@ drawEdge = (d, arrowWidth, arrowHeight, arrowStart, arrowEnd) => {
let offset = arrowStart && arrowEnd ? -k : 0;
// Relation name
if (showName && (transform.k >= transformThreshold)) {
if (showName) {
ctx.textAlign = 'center';
ctx.textBaseline = 'middle';