diff --git a/airtime_mvc/public/js/airtime/library/spl.js b/airtime_mvc/public/js/airtime/library/spl.js index 39cbbe7d2..393571902 100644 --- a/airtime_mvc/public/js/airtime/library/spl.js +++ b/airtime_mvc/public/js/airtime/library/spl.js @@ -1119,7 +1119,8 @@ var AIRTIME = (function(AIRTIME){ { src: $fadeOut.data("fadeout"), cuein: $fadeOut.data("cuein"), - cueout: $fadeOut.data("cueout") + cueout: $fadeOut.data("cueout"), + moveable: false }, { src: $fadeIn.data("fadein"), diff --git a/airtime_mvc/public/js/waveformplaylist/track.js b/airtime_mvc/public/js/waveformplaylist/track.js index a3123d0d7..f7140a0ee 100644 --- a/airtime_mvc/public/js/waveformplaylist/track.js +++ b/airtime_mvc/public/js/waveformplaylist/track.js @@ -64,7 +64,7 @@ TrackEditor.prototype.setWidth = function(width) { this.width = width; }; -TrackEditor.prototype.init = function(src, start, end, fades, cues) { +TrackEditor.prototype.init = function(src, start, end, fades, cues, moveable) { makePublisher(this); @@ -97,10 +97,15 @@ TrackEditor.prototype.init = function(src, start, end, fades, cues) { this.selectedArea = undefined; //selected area of track stored as inclusive buffer indices to the audio buffer. this.active = false; + this.canShift = moveable !== undefined ? moveable : true; this.container.classList.add("channel-wrapper"); this.container.style.left = this.leftOffset; + if (this.canShift === false) { + this.container.style.position = "static"; + } + this.drawer.drawLoading(); return this.container; @@ -132,7 +137,8 @@ TrackEditor.prototype.loadTrack = function(track) { { cuein: track.cuein, cueout: track.cueout - } + }, + track.moveable ); this.loadBuffer(track.src); @@ -248,6 +254,10 @@ TrackEditor.prototype.timeShift = function(e) { scroll = this.config.getTrackScroll(), scrollX = scroll.left; + if (this.canShift === false) { + return; //setting the 'left' css property has no effect, but don't want internal variable leftOffset to update. + } + origX = editor.leftOffset / res; //dynamically put an event on the element.