TiDraggable
TiDraggable copied to clipboard
Draggable Views inside a ScrollView disable scrolling when enabled set to false
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?
I forked this module and wrote an update that fit our use case.
https://github.com/VerbalApplicationsInc/TiDraggable