PDA

View Full Version : Dataview does not fire 'mouseenter' event



Muhlegg
17 Aug 2010, 5:02 AM
Any ideas why my dataview does not fire 'mouseenter' event? Click event works fine...



new Ext.DataView({
autoWidth: true,
autoHeight: true,
store: this.galleryStore,
itemSelector: 'div.thumb',
tpl: new Ext.XTemplate(
'<tpl for=".">',
'<div id="img_{id}" class="thumb"><img src="{path}thumbs/{filename}"></div>',
'</tpl>'
),
listeners: {
'click': {
fn: function(dataView, index, node, e) {
var record = dataView.getRecord(node);
if(Ext.getCmp('win_imgView')) Ext.getCmp('win_imgView').close();

lougisExtRequest({
url: '/run/img/extImageView/',
method: 'POST',
params: {
imageId: record.data.id
},
destCmp: '',
fn: drawWindow,
spot: false
});

},
scope: this
},
'mouseenter': {
fn: function(dataView, index, node, e) {
console.info('test');
var record = dataView.getRecord(node);
drawLocation(record.data, 'hover');
},
scope: this
},
'mouseleave': {
fn: function(dataView, index, node, e) {
var record = dataView.getRecord(node);
drawLocation(record.data, 'bullet');
},
scope: this
}
},
plugins: new Ext.ux.DataTip({
tpl:
'<div class="img-tooltip">' +
'<b>{header}</b> by {username}<br>' +
'<span class="img-tooltip-desc">{description}</span>' +
'</div>',
anchor: 'right',
trackMouse: true
})

});

Condor
17 Aug 2010, 5:15 AM
You need to configure the dataview with trackOver:true.

Muhlegg
17 Aug 2010, 10:12 PM
Thanks.