CC-2301 : disallowing movement of first track in fade editor.
This commit is contained in:
parent
179621d687
commit
0deaee4d0e
2 changed files with 14 additions and 3 deletions
|
@ -1119,7 +1119,8 @@ var AIRTIME = (function(AIRTIME){
|
||||||
{
|
{
|
||||||
src: $fadeOut.data("fadeout"),
|
src: $fadeOut.data("fadeout"),
|
||||||
cuein: $fadeOut.data("cuein"),
|
cuein: $fadeOut.data("cuein"),
|
||||||
cueout: $fadeOut.data("cueout")
|
cueout: $fadeOut.data("cueout"),
|
||||||
|
moveable: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
src: $fadeIn.data("fadein"),
|
src: $fadeIn.data("fadein"),
|
||||||
|
|
|
@ -64,7 +64,7 @@ TrackEditor.prototype.setWidth = function(width) {
|
||||||
this.width = 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);
|
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.selectedArea = undefined; //selected area of track stored as inclusive buffer indices to the audio buffer.
|
||||||
this.active = false;
|
this.active = false;
|
||||||
|
this.canShift = moveable !== undefined ? moveable : true;
|
||||||
|
|
||||||
this.container.classList.add("channel-wrapper");
|
this.container.classList.add("channel-wrapper");
|
||||||
this.container.style.left = this.leftOffset;
|
this.container.style.left = this.leftOffset;
|
||||||
|
|
||||||
|
if (this.canShift === false) {
|
||||||
|
this.container.style.position = "static";
|
||||||
|
}
|
||||||
|
|
||||||
this.drawer.drawLoading();
|
this.drawer.drawLoading();
|
||||||
|
|
||||||
return this.container;
|
return this.container;
|
||||||
|
@ -132,7 +137,8 @@ TrackEditor.prototype.loadTrack = function(track) {
|
||||||
{
|
{
|
||||||
cuein: track.cuein,
|
cuein: track.cuein,
|
||||||
cueout: track.cueout
|
cueout: track.cueout
|
||||||
}
|
},
|
||||||
|
track.moveable
|
||||||
);
|
);
|
||||||
this.loadBuffer(track.src);
|
this.loadBuffer(track.src);
|
||||||
|
|
||||||
|
@ -248,6 +254,10 @@ TrackEditor.prototype.timeShift = function(e) {
|
||||||
scroll = this.config.getTrackScroll(),
|
scroll = this.config.getTrackScroll(),
|
||||||
scrollX = scroll.left;
|
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;
|
origX = editor.leftOffset / res;
|
||||||
|
|
||||||
//dynamically put an event on the element.
|
//dynamically put an event on the element.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue