|
@@ -669,24 +669,27 @@
|
|
console.log('CompoPlayer initControls()');
|
|
console.log('CompoPlayer initControls()');
|
|
this.$composer = $('.composition_ui .composer');
|
|
this.$composer = $('.composition_ui .composer');
|
|
this.$controls = $('.composition_ui .composer .compo-player-controls');
|
|
this.$controls = $('.composition_ui .composer .compo-player-controls');
|
|
|
|
+ if(!this.$controls.is('.ready') && this.$compo){
|
|
|
|
+ this.$previous = $('<div>').addClass('previous')
|
|
|
|
+ .on('click', this.prev.bind(this))
|
|
|
|
+ .appendTo(this.$controls);
|
|
|
|
+ this.$playpause = $('<div>').addClass('play-pause')
|
|
|
|
+ .on('click', this.togglePlayPause.bind(this))
|
|
|
|
+ .appendTo(this.$controls);
|
|
|
|
+ this.$next = $('<div>').addClass('next')
|
|
|
|
+ .on('click', this.next.bind(this))
|
|
|
|
+ .appendTo(this.$controls);
|
|
|
|
|
|
- this.$previous = $('<div>').addClass('previous')
|
|
|
|
- .on('click', this.prev.bind(this))
|
|
|
|
- .appendTo(this.$controls);
|
|
|
|
- this.$playpause = $('<div>').addClass('play-pause')
|
|
|
|
- .on('click', this.togglePlayPause.bind(this))
|
|
|
|
- .appendTo(this.$controls);
|
|
|
|
- this.$next = $('<div>').addClass('next')
|
|
|
|
- .on('click', this.next.bind(this))
|
|
|
|
- .appendTo(this.$controls);
|
|
|
|
|
|
+ this.$controls.addClass('ready');
|
|
|
|
|
|
- this.active = true; // TODO: set active false
|
|
|
|
-
|
|
|
|
- this.newCompo();
|
|
|
|
|
|
+ this.active = true; // TODO: set active false
|
|
|
|
+ this.newCompo();
|
|
|
|
+ }
|
|
},
|
|
},
|
|
newCompo(){
|
|
newCompo(){
|
|
console.log('CompoPlayer newCompo()');
|
|
console.log('CompoPlayer newCompo()');
|
|
this.$compo = $('.composition_ui .composer .composition');
|
|
this.$compo = $('.composition_ui .composer .composition');
|
|
|
|
+ this.initControls();
|
|
this.refresh();
|
|
this.refresh();
|
|
},
|
|
},
|
|
refresh(){
|
|
refresh(){
|