integration/js/mashupcore.js
changeset 73 475e5fb0ea2b
parent 69 e56b4456668f
child 104 1b84c7b2aeee
equal deleted inserted replaced
72:aa85db611fb7 73:475e5fb0ea2b
   646     })
   646     })
   647     .mouseleave(function() {
   647     .mouseleave(function() {
   648         project.trigger("mouseout-annotation");
   648         project.trigger("mouseout-annotation");
   649         mouseoverSegment = undefined;
   649         mouseoverSegment = undefined;
   650     })
   650     })
   651     .click(function(evt) {
       
   652         if (!mashup.duration.milliseconds) {
       
   653             return;
       
   654         }
       
   655         var el = $(this), t = ( evt.pageX - el.offset().left ) * mashup.duration / el.width(), segment = mashup.getAnnotationAtTime(t);
       
   656         if (segment) {
       
   657             project.trigger("click-annotation", segment.annotation);
       
   658         }
       
   659     });
       
   660     
   651     
   661     mashup.trigger("add");
   652     mashup.trigger("add");
   662     
   653     
   663 }
   654 }
   664 
   655