Flex ItemRenderer 未将鼠标悬停传递给父级
在使用 MXAdvancedDataGridItemRenderer 的 AdvancedDataGrid 中,鼠标悬停未传递到 AdvancedDataGrid。
经过几天的奋斗,我想分享一下: 在您的数据设置器中,为 super.data 分配要冒泡的鼠标事件的新值(?!)
示例(不起作用)
override public function set data( value:Object):void {
var latency:Number = value[ ( this.listData as DataGridListData).dataField] as Number;
// Do cool stuff
示例(有效)
override public function set data( value:Object):void {
var latency:Number = value[ ( this.listData as DataGridListData).dataField] as Number;
super.data = value;
// Do cool stuff
In an AdvancedDataGrid using an MXAdvancedDataGridItemRenderer, mouseover was not being passed on to the AdvancedDataGrid.
After days of struggle, I wanted to share this:
In your data setter, assign super.data with the new value for mouse events to be bubbled (?!)
Example (doesn't work)
override public function set data( value:Object):void {
var latency:Number = value[ ( this.listData as DataGridListData).dataField] as Number;
// Do cool stuff
Example (works)
override public function set data( value:Object):void {
var latency:Number = value[ ( this.listData as DataGridListData).dataField] as Number;
super.data = value;
// Do cool stuff
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
只需在 var Latency 之前声明 super.data = value ......
just declare super.data = value before var latency......
上面的例子有效。希望它可以节省您我花在弄清楚问题上的时间。
The example above works. Hope it can save you the time it took me to figure out.