react-native-progress icon indicating copy to clipboard operation
react-native-progress copied to clipboard

CircleSnail gets smaller the with increasing thickness

Open danielwinkler opened this issue 6 years ago • 1 comments

Use case: Show CircleSnail while loading, afterwards exchange with Circle that shows some progress.

When using the same size and thickness properties, they do not align properly (tested on 4.0.0). It seems the CircleSnail creates a circle that shrinks with increasing thickness:

const radius = size / 2 - thickness; const offset = { top: thickness, left: thickness, };

I'd assume, to fix that we could use thickness * 0.5 in the above calculation.

If this is intended, maybe create another flag that lets us decide on the behavior.

danielwinkler avatar Oct 29 '19 07:10 danielwinkler

Turns out its even easier, just remove the offset calculation. But that might break existing implementations, maybe it should be handled explicitly with the border property. ( see #175 )

danielwinkler avatar Oct 29 '19 07:10 danielwinkler