src/widgets/Slice.js
changeset 1033 c20df1c080e6
parent 1013 392ddcd212d7
child 1072 ac1eacb3aa33
--- a/src/widgets/Slice.js	Fri Feb 13 16:48:05 2015 +0100
+++ b/src/widgets/Slice.js	Fri Feb 13 16:57:53 2015 +0100
@@ -67,9 +67,16 @@
     
     this.getWidgetAnnotations().forEach(function(_a) {
         _a.on("enter", function() {
-            _this.$slider.slider("values",[_a.begin, _a.end]);
+            _this.setBounds(_a.begin, _a.end);
         });
     });
+    this.player.on("annotation-click", function(_a) {
+        _this.setBounds(_a.begin, _a.end);
+    });
+};
+
+IriSP.Widgets.Slice.prototype.setBounds = function(begin, end) {
+    this.$slider.slider("values", [ begin, end ]);
 };
 
 IriSP.Widgets.Slice.prototype.show = function() {