antvis / antvis/Graphin

Partial render size is too small causing artefacts on labels

Open
#489 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
1.1k
Forks
275
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug

The bounded box around the canvas local refresh/render in Graphin seems to be too small for some Font Families (and or viewports depending on browser used).

I suspect the local refresh box is calculated too eagerly, so if you have a certain font family or if you use Safari, it ends up overflowing - leaving artefacts behind. See picture below.

This seem to happen more on Safari (not so frequent in Chrome).

Suggestion: We should add some padding around the local render to avoid text/image overflow.

### Your Example Website or App

https://codesandbox.io/s/runtime-butterfly-z2fmlz?file=/src/App.tsx

### Steps to Reproduce the Bug or Issue

1. Open Safari browser on Mac
2. Open the URL https://codesandbox.io/s/runtime-butterfly-z2fmlz?file=/src/App.tsx
3. Drag the node around

### Expected behavior

No artefacts should be left behind.

### Screenshots or Videos

![Screenshot 2023-06-13 at 13 58 13](https://github.com/antvis/Graphin/assets/5095706/c4251d29-89fd-4223-a575-d30e1d4ab960)

### Platform

- OS: macOS
- Browser: Safari
- Version: 15.6.1 (17613.3.9.1.16)

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.