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

feat(android): add x/y to ScrollView drag events #14102

Merged
merged 3 commits into from
Oct 17, 2024
Merged

Conversation

m1ga
Copy link
Contributor

@m1ga m1ga commented Sep 2, 2024

x/y position of the touch when using dragstart/dragend:

var win = Ti.UI.createWindow();

var scrollView = Ti.UI.createScrollView({
  showVerticalScrollIndicator: true,
  showHorizontalScrollIndicator: true,
  height: '80%',
  width: '80%'
});
var view = Ti.UI.createView({
  backgroundColor:'#336699',
  borderRadius: 10,
  top: 10,
  height: 2000,
  width: 1000
});
scrollView.add(view);
scrollView.addEventListener("dragstart", function(e){
	console.log(e.x, e.y);
})
scrollView.addEventListener("dragend", function(e){
	console.log(e.x, e.y);
})
win.add(scrollView);
win.open();

@deckameron
Copy link
Contributor

Hi @m1ga
I created the iOS version here.

@m1ga m1ga marked this pull request as ready for review October 7, 2024 17:59
@m1ga
Copy link
Contributor Author

m1ga commented Oct 7, 2024

Awesome, thanks @deckameron

@hansemannn hansemannn merged commit 70073c4 into master Oct 17, 2024
7 checks passed
@hansemannn hansemannn deleted the dragTouchEvents branch October 17, 2024 17:04
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

Successfully merging this pull request may close these issues.

3 participants