We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently SlidingDot operates on the screen width, though I'm using it on a card with images being narrower than a window width.
SlidingDot
On image scroll I have to replace
onProgressChange={(offsetProgress) => scrollX.setValue(-offsetProgress)}
with
onProgressChange={(offsetProgress) => scrollX.setValue( -offsetProgress * (windowWidth / imageWidth) + (windowWidth - imageWidth) * (MARGIN_SIZE / windowWidth) ) } // ... <SlidingDot marginHorizontal={MARGIN_SIZE} {...otherProps} />
Giving an ability to change the inputRange to [-imageWidth, 0, imageWidth] I'll be able to skip this sophisticated scaling.
inputRange
[-imageWidth, 0, imageWidth]
The text was updated successfully, but these errors were encountered:
Excellent observation. for the ExpandingDot component I added the property
itemWidth?: number;
and modified
const inputRange = [ (index - 1) * width, index * width, (index + 1) * width, ];
in
const inputRange = [ (index - 1) * (itemWidth || width), index * (itemWidth || width), (index + 1) * (itemWidth || width), ];
Now I use
<ExpandingDot data={items} ... itemWidth={myItemWidth} />
Sorry, something went wrong.
@weahforsage What do you think on that problem? Can you approve the idea so the PR may be opened?
No branches or pull requests
Currently
SlidingDot
operates on the screen width, though I'm using it on a card with images being narrower than a window width.On image scroll I have to replace
with
Giving an ability to change the
inputRange
to[-imageWidth, 0, imageWidth]
I'll be able to skip this sophisticated scaling.The text was updated successfully, but these errors were encountered: