src/widgets/Slice.js
changeset 1033 c20df1c080e6
parent 1013 392ddcd212d7
child 1072 ac1eacb3aa33
equal deleted inserted replaced
1032:74ac0be7655c 1033:c20df1c080e6
    65     this.$slider.find(".ui-slider-handle:first").addClass("Ldt-Slice-left-handle");
    65     this.$slider.find(".ui-slider-handle:first").addClass("Ldt-Slice-left-handle");
    66     this.$slider.find(".ui-slider-handle:last").addClass("Ldt-Slice-right-handle");
    66     this.$slider.find(".ui-slider-handle:last").addClass("Ldt-Slice-right-handle");
    67     
    67     
    68     this.getWidgetAnnotations().forEach(function(_a) {
    68     this.getWidgetAnnotations().forEach(function(_a) {
    69         _a.on("enter", function() {
    69         _a.on("enter", function() {
    70             _this.$slider.slider("values",[_a.begin, _a.end]);
    70             _this.setBounds(_a.begin, _a.end);
    71         });
    71         });
    72     });
    72     });
       
    73     this.player.on("annotation-click", function(_a) {
       
    74         _this.setBounds(_a.begin, _a.end);
       
    75     });
       
    76 };
       
    77 
       
    78 IriSP.Widgets.Slice.prototype.setBounds = function(begin, end) {
       
    79     this.$slider.slider("values", [ begin, end ]);
    73 };
    80 };
    74 
    81 
    75 IriSP.Widgets.Slice.prototype.show = function() {
    82 IriSP.Widgets.Slice.prototype.show = function() {
    76     this.$slider.show();
    83     this.$slider.show();
    77 };
    84 };