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

Draggable Views inside a ScrollView disable scrolling when enabled set to false #32

Open
krmannix opened this issue Oct 6, 2015 · 1 comment

Comments

@krmannix
Copy link

krmannix commented Oct 6, 2015

I'm creating many Draggable views inside a ScrollView like below.

var scroll = Ti.UI.createScrollView({
    contentWidth: 'auto',
    contentHeight: '100%',
    showHorizontalScrollIndicator: true,
    showVerticalScrollIndicator: false,
    scrollType: 'horizontal'
});

for (var i = 0; i < views.length; i++) {
   var tile = Draggable.createView({
        width: width,
        height: height,
        left: left,
        top: top,
        bubbleParent: true,
        backgroundImage: image,
        draggable: {
           enabled: false
        }
   });
   scroll.add(tile);
}

When I use the native Titanium View, scrolling works as expected. However, when I disable the dragging abilities on a Draggable view, the scroll event does not bubble to the parent, which is a scroll view. Is there a way to keep scrolling enabled & responding while disabling the dragging feature for a ScrollView's children?

@krmannix
Copy link
Author

krmannix commented Oct 9, 2015

I forked this module and wrote an update that fit our use case.

https://github.com/VerbalApplicationsInc/TiDraggable

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