我是 Ext Js 4 的新手。我的问题很简单,但我找不到任何文档或任何论坛。我有一个 xtype: 'panel' 有一个图像映射,上面有几个链接。我正在尝试在该面板上添加一个侦听器,以便我可以在我的“控制器”中控制它。我怎样才能做到这一点,以便我遵循 MVC 模型?
{
xtype:'panel',
id:'tab2',
html:
'<div><img src="app/image/tableRoomPoster.jpg" usemap=#conferenceRoom >'+
'<map id="conferenceRoom" name="conferenceRoom">' +
'<div id ="remote"> <area shape="rect" alt="Remote" title="" coords="727,568,834,613" href="#" ></div>'+
'<div id ="virOfficeMain"><area shape="circle" alt="virOfficeMain" title="" coords="28,624,18" href="#" ></div>'+
'</map></div>' +
'<div id="toggleRemote" style="display:none"><img src="app/image/remoteShrink.png" usemap=#controlRemote >'+
'<map id="controlRemote" name="controlRemote">'+
'<area id ="remoteOff" shape="circle" alt="Off" title="" coords="118,51,11" href="#" />'+
'<div class="playVideoMonitor" id="button1"style="display:none">'+
'<area shape="rect" alt="button1" title="" coords="20,74,42,87" href="#"/>'+
'<iframe border:"block" width="302" height="174"src="http://www.youtube.com/embed/VHySPMCNS34" '+
'frameborder="0" ></iframe></div>'+
'<div class="playVideoMonitor" id="button2" style="display:none">'+
'<area shape="rect" alt="button2" title="" coords="61,75,85,89" href="#"/>'+
'<iframe id="video2"width="302" height="174" src="http://www.youtube.com/embed/ts8Q6LwDMcs" '+
'frameborder="0" allowfullscreen></iframe></map></div>'
}],
listeners : {
afterrender : function(c) {
c.getEl().on('click', function(e){
this.fireEvent('click', c);
}, c);
}
}