0

我正在尝试显示用户可以平移的大图像(因此垂直和水平滚动)。但我无法让图像滚动。这就是我所拥有的:

Ext.define('myapp.view.image.Floorplan', {

extend: 'Ext.Container',    
requires: 'Ext.Img',
xtype: 'floorplan',

config: {

    title: 'Floorplan',
    iconCls: 'locate',
    items: [
      {
        xtype: 'image',    
        scrollable: true,
        src: './resources/images/floorplan.png',
        height: 1570,
        width: 1047
      }
    ]
}

});

如何使图像可滚动?

谢谢马特

4

1 回答 1

1

试试这个

{
    xtype:'panel',
    scrollable: true,
    items:[
        {
            xtype: 'image',
            src: 'http://www.hdwallpapersarena.com/wp-content/uploads/2012/07/0000037-2650.jpg',
            height: 1570,
            width: 2047
        }
    ]
}

图像小部件没有可滚动的属性。

于 2012-09-03T00:21:40.423 回答