comparison interfaces/horizontal-sliders.js @ 2725:9c01d5dd22a2

#163. Made comment box highlighting a core function
author Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk>
date Sat, 15 Apr 2017 11:59:21 +0100
parents 87d9f785f1ec
children c59bcb698684
comparison
equal deleted inserted replaced
2724:a684dc7a5327 2725:9c01d5dd22a2
294 $(this.holder).addClass('track-slider-playing'); 294 $(this.holder).addClass('track-slider-playing');
295 var outsideReference = document.getElementById('outside-reference'); 295 var outsideReference = document.getElementById('outside-reference');
296 if (outsideReference !== null) { 296 if (outsideReference !== null) {
297 $(outsideReference).removeClass('track-slider-playing'); 297 $(outsideReference).removeClass('track-slider-playing');
298 } 298 }
299 interfaceContext.commentBoxes.highlightById(audioObject.id);
299 }; 300 };
300 this.stopPlayback = function () { 301 this.stopPlayback = function () {
301 // Called when playback has stopped. This gets called even if playback never started! 302 // Called when playback has stopped. This gets called even if playback never started!
302 this.play.setAttribute("playstate", "ready"); 303 this.play.setAttribute("playstate", "ready");
303 $(this.holder).removeClass('track-slider-playing'); 304 $(this.holder).removeClass('track-slider-playing');
305 var box = interfaceContext.commentBoxes.boxes.find(function (a) {
306 return a.id === audioObject.id;
307 });
308 if (box) {
309 box.highlight(false);
310 }
304 }; 311 };
305 this.getValue = function () { 312 this.getValue = function () {
306 // Return the current value of the object. If there is no value, return 0 313 // Return the current value of the object. If there is no value, return 0
307 return this.slider.value; 314 return this.slider.value;
308 }; 315 };