TiDraggable
TiDraggable copied to clipboard
Mapping - lock axis and position
Setup is like this:
var all = Ti.UI.View({width:600,height:100});
var handle = Draggable.createView({
width:20,
height:100,
backgroundColor:"#f00",
right:0,
top:0,
draggableConfig : {
axis:"y",
ensureRight : true,
ensureBottom : true,
maps: [{
view:all,
parallaxAmount:1
}]
}
});
all.add(handle);
How can I prevent the red handle from moving outside and how can I set the axis for the mapped view to y only?