My image displays fine but the view can only be moved over the view until you let go of you hold. Then it pops back into it's default position.
The default position can be changed by clicking in the scrollbar (not dragging the block).
Adding a spacer didn't help.
Using layout: 'fit', just causes the image to shrink to the container size, while the container should scroll over the image.
This code should work in fiddle.sencha with framework: Sencha Touch 2.4.1 Sencha Touch
Ext.application({
name : 'Fiddle',
launch : function() {
Ext.Viewport.add(Ext.create('Ext.Container',
{
layout: 'fit',
height: 400,
scrollable: {
direction: 'vertical',
directionLock: true
},
items: [{
xtype: 'image',
mode: 'image',
height: 1600,
src: 'http://upload.wikimedia.org/wikipedia/commons/4/46/HK-towerblock-sj.jpg'
}, {
xtype: 'spacer',
height: 50
}]
}));
}
});
So how can I get real scrolling over an image?