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

hide graph relation labels by zoom threshold

This commit is contained in:
Andrew Simachev 2024-04-10 23:05:17 +02:00
parent 3f41db1ac6
commit 261a4730cb
No known key found for this signature in database
GPG key ID: 49A163D0D14E6FD8
2 changed files with 2 additions and 2 deletions

View file

@ -377,7 +377,7 @@ drawEdge = (d, arrowWidth, arrowHeight, arrowStart, arrowEnd) => {
let offset = arrowStart && arrowEnd ? -k : 0;
// Relation name
if (showName) {
if (showName && (transform.k >= transformThreshold)) {
ctx.textAlign = 'center';
ctx.textBaseline = 'middle';

View file

@ -193,7 +193,7 @@ const Card = observer(class Card extends React.Component<Props> {
mediaCover (item: any) {
const { layout, coverType, coverId, coverX, coverY, coverScale } = item;
const cn = [ 'cover', `type${I.CoverType.Upload}` ];
let mc = null;
if (coverId && coverType) {
mc = (