TiDraggable icon indicating copy to clipboard operation
TiDraggable copied to clipboard

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

Open krmannix opened this issue 10 years ago • 1 comments

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 avatar Oct 06 '15 13:10 krmannix

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

https://github.com/VerbalApplicationsInc/TiDraggable

krmannix avatar Oct 09 '15 21:10 krmannix