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

Inactive space on the left when dragging #41

Closed
NeXTs opened this issue Feb 18, 2019 · 19 comments
Closed

Inactive space on the left when dragging #41

NeXTs opened this issue Feb 18, 2019 · 19 comments

Comments

@NeXTs
Copy link

NeXTs commented Feb 18, 2019

Example on codesandbox

There is some inactive space on the left, when dragging items.
When you drag to the right - it scrolls back to the center, as intended.
Same happens when you scroll way left, it scrolls back to the center, it's ok.
But when you scroll slightly to the left, there is an area where items stuck and do not scrolls back to the center.

bug3

@asmyshlyaev177
Copy link
Owner

Didn't intend to work like this.
Will try to add this feature later.

@marcin-wojciechowski-lingaro

+1, transform: translate3d() adds useless spacing on the left and right

@asmyshlyaev177
Copy link
Owner

I fixed it, should work fine in version 0.5.5 .

@NeXTs
Copy link
Author

NeXTs commented Mar 11, 2019

Hey
Yes, in version 0.5.5 there is no more inactive space on the left, but #40 bug appears again

@asmyshlyaev177
Copy link
Owner

Strange, can't reproduce it now, but should be bug only in example project.

@marcin-wojciechowski-lingaro

Still can't remove this spacing.

image

@asmyshlyaev177
Copy link
Owner

asmyshlyaev177 commented Mar 11, 2019

Will be good if you can reproduce it.

@marcin-wojciechowski-lingaro

Will be good if you can reproduce it.

image

Something is wrong with first and last item in calculations. For first one should be 0px, 0px, 0px and it would be working fine.

@asmyshlyaev177
Copy link
Owner

Maybe something else, it is 0 if alignCenter = false.

@marcin-wojciechowski-lingaro
Copy link

Yes now it works, but now there is no possibility to preview previous item from the left. Any idea how to make item3 visible? To improve UX?

image

@asmyshlyaev177
Copy link
Owner

Only show arrow, not sure.

@NeXTs
Copy link
Author

NeXTs commented Mar 12, 2019

Strange, can't reproduce it now, but should be bug only in example project.

https://codesandbox.io/s/l207m799kq
Updated only v0.5.0 -> v0.5.5. Click right arrow, then left arrow. Left arrow wouldn't work.

@asmyshlyaev177
Copy link
Owner

Thank you, fixed it, check 0.5.6 version.

@NeXTs
Copy link
Author

NeXTs commented Mar 12, 2019

Yes, it works great now. Thank you!

@NeXTs NeXTs closed this as completed Mar 12, 2019
@NeXTs
Copy link
Author

NeXTs commented Mar 20, 2019

Still can't remove this spacing.

image

In version 0.5.6 I've faced this problem too. Appears on init.
Settings

<ScrollMenu
  data={this.items}
  arrowLeft={<Arrow type="prev" className={style.sliderArrow} />}
  arrowRight={<Arrow type="next" className={style.sliderArrow} />}
  onSelect={this.onItemClick}
  wheel={false}
  alignCenter={false}
  wrapperClass={style.sliderInner}
  itemClass={style.sliderItem}
/>

@NeXTs
Copy link
Author

NeXTs commented Mar 22, 2019

Do you need some demo to reproduce this or you've already noticed this behavior too?

@asmyshlyaev177
Copy link
Owner

Better if have demo.

@NeXTs
Copy link
Author

NeXTs commented Mar 22, 2019

@marcinWojciechowskiLingaro do you have any?

@NeXTs
Copy link
Author

NeXTs commented Mar 25, 2019

I've reinstalled whole node_modules and don't see this issue anymore.

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

3 participants