LimeJS Custom Sprite Swallowing活动

Bri*_*ins 11 javascript html5 game-engine google-closure-library limejs

我做了一个自定义的Lime JS sprite类:

test.obj = function() {
  lime.Sprite.call(this);
  .
  .
  this.label = new lime.Label(). ...;
  this.appendChild(this.label);
}
goog.inherits(test.obj, lime.Sprite);
Run Code Online (Sandbox Code Playgroud)

我无法让标签点击冒泡到根程序; 它总是吞下事件.是否有一些特殊的东西要点击标签以冒泡到我的根事件处理程序,这是:

goog.events.listen(objinstance, ["click", "touchstart"], function() { .. });
Run Code Online (Sandbox Code Playgroud)

fla*_*ian 1

您正在停止任何传播吗?如果不是这样的话,那就很奇怪了。查看侦听器函数,该函数应将 goog.events.BrowserEvent 对象作为参数传递下去,并查看它们是否自动停止来自库源内部的某些传播。