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

Two PageComponents can interfere with each other if velocityThreshold == 0 #562

Open
onnlucky opened this issue Jan 29, 2018 · 0 comments
Open

Comments

@onnlucky
Copy link
Collaborator

If you have two PageComponents on screen (see code below), then:

  • top one has velocityThreshold: 0
  • scroll the top one
  • scroll the bottom one

unexpected: the top one scrolls by one page

The culprit in this case is velocityThreshold: 0. But at a deeper level, somehow the first page components reacts to events that are never meant for it. It seems DragSessionEnd

@content.on(Events.DragSessionEnd, @_scrollEnd)


page = new PageComponent
	width: Screen.width
	height: 100
	velocityThreshold: 0 # setting this to anything else > 0 works
	
for i in [0..10]
	new Layer
		width: 100
		parent: page.content
		x: i * (100 + 8)

page2 = new PageComponent
	width: Screen.width
	height: 100
	y: 200
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

1 participant