drawdb icon indicating copy to clipboard operation
drawdb copied to clipboard

Field Circle Icons

Open benranderson opened this issue 1 year ago • 9 comments

Blue circle icons next to fields show out of position on Safari:

image

Looks fine on Google Chrome:

image

benranderson avatar Apr 11 '24 20:04 benranderson

Is it like this in the editor as well?

I won't be able to try this on Mac until next week. Until then if anyone can check this out I'll really appreciate it.

1ilit avatar Apr 11 '24 21:04 1ilit

The issue is coming from the unexpected values that are being set in Canvas.jsx. And, the values are coming from diagram in Workspace.jsx by id. Does it have different values for each id? And how are those values evaluated in db?

haecheonlee avatar Apr 11 '24 23:04 haecheonlee

The screenshot OP posted doesn't use Canvas.jsx or Workspace.jsx so it should be something else

1ilit avatar Apr 12 '24 01:04 1ilit

It calls setTransform in Workplace.jsx and it sets pan and zoom of diagram. The value is used in Canvas.jsx and it wraps Table.jsx. You can simply go through the DevTool and check the value.

haecheonlee avatar Apr 12 '24 01:04 haecheonlee

The screenshot is from the landing page. The landing page uses SimpleCanvas which is a simplified canvas that doesn't use any of the hooks

1ilit avatar Apr 12 '24 01:04 1ilit

Oh, I understood. I was working on Try it for yourself. It seems to be that the scale of transform doesn't work the same way in safari. It looks good when the value of scale is set to 1. By default, it's set to 0.85.

haecheonlee avatar Apr 12 '24 01:04 haecheonlee

The default is 1. It's probably 0.85 because your latest diagram is being loaded which was saved with scale = 0.85

1ilit avatar Apr 12 '24 01:04 1ilit

For the zoom value, I meant in LandingPage.jsx. It has the fixed value of 0.85. And, the issue in the page, Try it for yourself, seems to be the value used for translate in Canvas.jsx. I am guessing that Safari has different rendering on svg elements with the style of transform.

haecheonlee avatar Apr 12 '24 01:04 haecheonlee

I'll check it out, thanks

1ilit avatar Apr 12 '24 01:04 1ilit