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

fix: handle x/y position for touch in dragstart/dragend events on iOS #14134

Merged
merged 4 commits into from
Oct 17, 2024

Conversation

deckameron
Copy link
Contributor

@deckameron deckameron commented Oct 7, 2024

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();

The Android version is this:
#14102

@hansemannn
Copy link
Collaborator

Hi @deckameron! Thanks for your PR! Can you rename "drag_dict" to "event" or "dict" for better consistency please? We usually don't use snake_case in the code :-) That'd be great! And we need the CLA signed once, you can learn more about it here. tldr: Contact @joshualambert via TiSlack

@m1ga
Copy link
Contributor

m1ga commented Oct 17, 2024

you can use https://tidev.io/contribute to automatically sign the CLA

@hansemannn
Copy link
Collaborator

Thx! I just updated the page

@deckameron
Copy link
Contributor Author

Thanks guys!
I just signed the CLA and pushed the update you requested. :-)

@hansemannn hansemannn merged commit 62e9d4a into tidev:master Oct 17, 2024
5 checks passed
@hansemannn
Copy link
Collaborator

Awesome, thank you! Great improvement!

@m1ga
Copy link
Contributor

m1ga commented Oct 17, 2024

@hansemannn can we merge the Android part of it too: #14102 it has the docs for this

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