# HG changeset patch # User Nicholas Jillings # Date 1493973344 -3600 # Node ID 6fe4ab566afabb92ccde927f719edc2e452393a7 # Parent 6c41a874fd21500e3719546c5891ea28d40f731e# Parent 058f270e6d4d751b94ad89b24beae5a55a16431b Merge branch 'master' into vnext diff -r 6c41a874fd21 -r 6fe4ab566afa interfaces/ape.js --- a/interfaces/ape.js Wed Apr 26 10:33:35 2017 +0100 +++ b/interfaces/ape.js Fri May 05 09:35:44 2017 +0100 @@ -655,7 +655,9 @@ var obj = []; $(this.trackSliderObjects).each(function (i, trackObj) { var node = storage.document.createElement('value'); - node.setAttribute("interface-name", trackObj.getAttribute("interface-name")); + if (trackObj.getAttribute("interface-name") !== "null") { + node.setAttribute("interface-name", trackObj.getAttribute("interface-name")); + } node.textContent = convSliderPosToRate(trackObj); obj.push(node); }); @@ -847,7 +849,9 @@ for (var j = 0; j < mrnodes.length; j++) { var name = mrnodes[j].getAttribute("name"); if (name == "elementTracker" || name == "elementTrackerFull" || name == "elementInitialPosition" || name == "elementFlagMoved") { - mrnodes[j].setAttribute("interface-name", interfaceContext.interfaceSliders[k].name); + if (interfaceContext.interfaceSliders[k].name !== null) { + mrnodes[j].setAttribute("interface-name", interfaceContext.interfaceSliders[k].name); + } mrnodes[j].setAttribute("interface-id", k); } } diff -r 6c41a874fd21 -r 6fe4ab566afa js/core.js --- a/js/core.js Wed Apr 26 10:33:35 2017 +0100 +++ b/js/core.js Fri May 05 09:35:44 2017 +0100 @@ -2903,32 +2903,20 @@ } } } + if (this.playbackObject !== undefined && this.interval === undefined) { + window.requestAnimationFrame(this.update.bind(this)); + } }; playhead.interval = undefined; playhead.start = function () { if (this.playbackObject !== undefined && this.interval === undefined) { - if (this.maxTime < 60) { - this.interval = window.setInterval(function () { - interfaceContext.playhead.update(); - }, 10); - } else { - this.interval = window.setInterval(function () { - interfaceContext.playhead.update(); - }, 100); - } + window.requestAnimationFrame(this.update.bind(this)); } }; playhead.stop = function () { - window.clearInterval(this.interval); - this.interval = undefined; - this.scrubberHead.style.left = '0px'; - if (this.maxTime < 60) { - this.curTimeSpan.textContent = '0.00'; - } else { - this.curTimeSpan.textContent = '00:00'; - } + this.timePerPixel = 0; }; return playhead; })();