Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect gaps when using createFlow() #95

Closed
romanpechegin opened this issue Nov 21, 2024 · 4 comments
Closed

Incorrect gaps when using createFlow() #95

romanpechegin opened this issue Nov 21, 2024 · 4 comments

Comments

@romanpechegin
Copy link

When using verticalGap and horizontalGap, gaps are not calculated correctly. Probably a toPx() call is missing somewhere.

createFlow(
      elements = refs.toTypedArray(),
      horizontalGap = 16.dp,
      verticalGap = 16.dp,
      wrapMode = Wrap.Chain,
      verticalAlign = VerticalAlign.Top
)

If you specify 16.dp.toPx().dp then everything works fine

@Lavmee
Copy link
Owner

Lavmee commented Jan 26, 2025

@romanpechegin
Does the original library have a similar problem?

@romanpechegin
Copy link
Author

Yes, same problem

@Lavmee
Copy link
Owner

Lavmee commented Jan 27, 2025

Then, I think it's worth creating an issue in the Google tracker, after fixing it, I'll add a fix to the kmp version.

@Lavmee
Copy link
Owner

Lavmee commented Jan 27, 2025

I roughly understand where the error is, but I don't want to have a logical discrepancy with the original library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants