我做了一个定制的Lime JS精灵类,方法是:
test.obj = function() {
lime.Sprite.call(this);
.
.
this.label = new lime.Label(). ...;
this.appendChild(this.label);
}
goog.inherits(test.obj, lime.Sprite);我不能让标签点击冒泡到根程序;它总是吞噬事件。您是否需要做一些特殊的操作才能单击标签,使其上升到我的根事件处理程序,这就是:
goog.events.listen(objinstance, ["click", "touchstart"], function() { .. });发布于 2012-10-17 00:17:17
您是否正在停止任何传播?如果不是这样的话,这是非常奇怪的。查看侦听器函数,该函数应将goog.events.BrowserEvent对象作为参数向下传递,并查看它们是否会自动停止来自库的源内部的一些传播。
https://stackoverflow.com/questions/11703194
复制相似问题