2015-12-02 58 views
0

我有容器。在那個容器裏面,我有3個可拖動的companent:如下圖所示:Sencha Touch 2.4.2 - 可拖動組件不在外面移動容器

我可以拖動父容器內的3個組件(上下移動) 但我需要將容器外的3個組件移動到左側,右側(箭頭標記)。

Screenshot of my current screen. I want to move the componets (10, 20, 30) to left side

是否有人可以幫助我在此。

這是我使用

{ 
xtype: 'container', //Middle Container 
width: '100%', 
height: '80%', 
style: 'background-color: #669900', 
layout: 'hbox', 
items: [{ 
    xtype: 'component', 
    itemId: 'markCompxx10', 
    draggable: true, 
    width: '100%', 
    height: '30%', 
    style: 'background-color: #00EE00', 
    html: '10', 
    listeners : { element : 'element', drag : function(e, t) { this.fireEvent('drag', this, e, t); }} 
}, { 
    xtype: 'component', 
    itemId: 'markCompxx20', 
    draggable: true, 
    width: '100%', 
    height: '30%', 
    style: 'background-color: #00EE00', 
    html: '20', 
    listeners : { element : 'element', drag : function(e, t) { this.fireEvent('drag', this, e, t); }} 
}, { 
    xtype: 'component', 
    itemId: 'markCompxx30', 
    width: '100%', 
    height: '30%', 
    style: 'background-color: #00FFEE', 
    html: '30', 
    listeners : { element : 'element', drag : function(e, t) { this.fireEvent('drag', this, e, t); }} 
}] 
} 

}

感謝

+0

有人對此問題有任何建議。我無法在互聯網上找到任何答案。感謝您的幫助 –

回答

0

檢查出我的阻力&降插件和example代碼。我改進了可拖曳類,不僅支持組件而且支持元素。這樣我可以設法做你不能做的事情。

如果它不幫你,在sencha fiddle重現相同的問題,以便我可以幫助你。

+0

是的,這是我需要的,我會檢查並回來。謝謝你的幫助。 –