--- a/src/widgets/Trace.js Fri Jan 25 18:47:43 2013 +0100
+++ b/src/widgets/Trace.js Mon Jan 28 18:17:26 2013 +0100
@@ -29,6 +29,10 @@
"play" : 0,
"pause" : 0,
"timeupdate" : 10000
+ },
+ _annlisteners = {
+ search: 0,
+ "search-cleared": 0
};
IriSP._(_medialisteners).each(function(_ms, _listener) {
var _f = function(_arg) {
@@ -39,6 +43,16 @@
}
_this.media.on(_listener, _f);
});
+ var _annotations = this.source.getAnnotations();
+ IriSP._(_annlisteners).each(function(_ms, _listener) {
+ var _f = function(_arg) {
+ _this.eventHandler(_listener, _arg);
+ }
+ if (_ms) {
+ _f = IriSP._.throttle(_f, _ms);
+ }
+ _annotations.on(_listener, _f);
+ });
if (!this.tracer) {
@@ -51,6 +65,8 @@
}
+
+
this.tracer.trace("TraceWidgetInit", {});
this.mouseLocation = '';
@@ -60,8 +76,6 @@
var _widget = _target.attr("widget-type") || _target.parents(".Ldt-Widget").attr("widget-type"),
_data = {
"type": _e.type,
- "x": _e.clientX,
- "y": _e.clientY,
"widget": _widget
},
_targetEl = _target[0],