shuffle player only on acive items in the map (entree, article, search results
This commit is contained in:
@@ -170,12 +170,6 @@
|
|||||||
'audio_url':nodes[i].audio_url
|
'audio_url':nodes[i].audio_url
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//console.log('_nodes',_nodes);
|
|
||||||
//console.log('_articles_nodes',_articles_nodes);
|
|
||||||
//console.log('_no_articles_nodes',_no_articles_nodes);
|
|
||||||
//console.log('_nodes_by_entries', _nodes_by_entries);
|
|
||||||
|
|
||||||
//console.log('_physics.attractions.length', _physics.attractions.length);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function Node(i,node,d){
|
function Node(i,node,d){
|
||||||
@@ -646,6 +640,19 @@
|
|||||||
// console.log('_physics.attractions.length', _physics.attractions.length);
|
// console.log('_physics.attractions.length', _physics.attractions.length);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// ___ _ ___ _ _ _ _
|
||||||
|
// | _ \__ _ _ _ __| |___ _ __ | _ \ |__ _ _ _| (_)__| |_
|
||||||
|
// | / _` | ' \/ _` / _ \ ' \ | _/ / _` | || | | (_-< _|
|
||||||
|
// |_|_\__,_|_||_\__,_\___/_|_|_| |_| |_\__,_|\_, |_|_/__/\__|
|
||||||
|
// |__/
|
||||||
|
function updateRandomPlaylist(p){
|
||||||
|
_$canvas.trigger({
|
||||||
|
type:'update-random-playlist',
|
||||||
|
playlist:p
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
// ___ _
|
// ___ _
|
||||||
// | __|_ _| |_ _ _ ___ ___ ___
|
// | __|_ _| |_ _ _ ___ ___ ___
|
||||||
// | _|| ' \ _| '_/ -_) -_|_-<
|
// | _|| ' \ _| '_/ -_) -_|_-<
|
||||||
@@ -684,6 +691,7 @@
|
|||||||
_nodes_centered.push(_nodes[n]);
|
_nodes_centered.push(_nodes[n]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
updateRandomPlaylist(_nodes_centered);
|
||||||
createNodesRepulsions();
|
createNodesRepulsions();
|
||||||
};
|
};
|
||||||
function highlightEntries(){
|
function highlightEntries(){
|
||||||
@@ -725,6 +733,7 @@
|
|||||||
_nodes_centered.push(_nodes[n]);
|
_nodes_centered.push(_nodes[n]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
updateRandomPlaylist(_nodes_centered);
|
||||||
createNodesRepulsions();
|
createNodesRepulsions();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -738,6 +747,7 @@
|
|||||||
for (var i = 0; i < _nodes.length; i++) {
|
for (var i = 0; i < _nodes.length; i++) {
|
||||||
_nodes[i].scramble();
|
_nodes[i].scramble();
|
||||||
}
|
}
|
||||||
|
updateRandomPlaylist(_playlist);
|
||||||
// setTimeout(stopScrambling, 2000);
|
// setTimeout(stopScrambling, 2000);
|
||||||
// stopScrambling();
|
// stopScrambling();
|
||||||
};
|
};
|
||||||
@@ -789,6 +799,7 @@
|
|||||||
for (var i = 0; i < _no_articles_nodes.length; i++) {
|
for (var i = 0; i < _no_articles_nodes.length; i++) {
|
||||||
_no_articles_nodes[i].fade();
|
_no_articles_nodes[i].fade();
|
||||||
}
|
}
|
||||||
|
updateRandomPlaylist(_articles_nodes);
|
||||||
};
|
};
|
||||||
function deactivateArticlesFilter(){
|
function deactivateArticlesFilter(){
|
||||||
//console.log('deactivateArticlesFilter');
|
//console.log('deactivateArticlesFilter');
|
||||||
@@ -796,6 +807,7 @@
|
|||||||
for (var i = 0; i < _no_articles_nodes.length; i++) {
|
for (var i = 0; i < _no_articles_nodes.length; i++) {
|
||||||
_no_articles_nodes[i].unFade();
|
_no_articles_nodes[i].unFade();
|
||||||
}
|
}
|
||||||
|
updateRandomPlaylist(_playlist);
|
||||||
};
|
};
|
||||||
function shutDownArticles(){
|
function shutDownArticles(){
|
||||||
// shutdown articles if active
|
// shutdown articles if active
|
||||||
|
|||||||
@@ -170,12 +170,6 @@
|
|||||||
'audio_url':nodes[i].audio_url
|
'audio_url':nodes[i].audio_url
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//console.log('_nodes',_nodes);
|
|
||||||
//console.log('_articles_nodes',_articles_nodes);
|
|
||||||
//console.log('_no_articles_nodes',_no_articles_nodes);
|
|
||||||
//console.log('_nodes_by_entries', _nodes_by_entries);
|
|
||||||
|
|
||||||
//console.log('_physics.attractions.length', _physics.attractions.length);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function Node(i,node,d){
|
function Node(i,node,d){
|
||||||
@@ -646,6 +640,19 @@
|
|||||||
// console.log('_physics.attractions.length', _physics.attractions.length);
|
// console.log('_physics.attractions.length', _physics.attractions.length);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// ___ _ ___ _ _ _ _
|
||||||
|
// | _ \__ _ _ _ __| |___ _ __ | _ \ |__ _ _ _| (_)__| |_
|
||||||
|
// | / _` | ' \/ _` / _ \ ' \ | _/ / _` | || | | (_-< _|
|
||||||
|
// |_|_\__,_|_||_\__,_\___/_|_|_| |_| |_\__,_|\_, |_|_/__/\__|
|
||||||
|
// |__/
|
||||||
|
function updateRandomPlaylist(p){
|
||||||
|
_$canvas.trigger({
|
||||||
|
type:'update-random-playlist',
|
||||||
|
playlist:p
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
// ___ _
|
// ___ _
|
||||||
// | __|_ _| |_ _ _ ___ ___ ___
|
// | __|_ _| |_ _ _ ___ ___ ___
|
||||||
// | _|| ' \ _| '_/ -_) -_|_-<
|
// | _|| ' \ _| '_/ -_) -_|_-<
|
||||||
@@ -684,6 +691,7 @@
|
|||||||
_nodes_centered.push(_nodes[n]);
|
_nodes_centered.push(_nodes[n]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
updateRandomPlaylist(_nodes_centered);
|
||||||
createNodesRepulsions();
|
createNodesRepulsions();
|
||||||
};
|
};
|
||||||
function highlightEntries(){
|
function highlightEntries(){
|
||||||
@@ -725,6 +733,7 @@
|
|||||||
_nodes_centered.push(_nodes[n]);
|
_nodes_centered.push(_nodes[n]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
updateRandomPlaylist(_nodes_centered);
|
||||||
createNodesRepulsions();
|
createNodesRepulsions();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -738,6 +747,7 @@
|
|||||||
for (var i = 0; i < _nodes.length; i++) {
|
for (var i = 0; i < _nodes.length; i++) {
|
||||||
_nodes[i].scramble();
|
_nodes[i].scramble();
|
||||||
}
|
}
|
||||||
|
updateRandomPlaylist(_playlist);
|
||||||
// setTimeout(stopScrambling, 2000);
|
// setTimeout(stopScrambling, 2000);
|
||||||
// stopScrambling();
|
// stopScrambling();
|
||||||
};
|
};
|
||||||
@@ -789,6 +799,7 @@
|
|||||||
for (var i = 0; i < _no_articles_nodes.length; i++) {
|
for (var i = 0; i < _no_articles_nodes.length; i++) {
|
||||||
_no_articles_nodes[i].fade();
|
_no_articles_nodes[i].fade();
|
||||||
}
|
}
|
||||||
|
updateRandomPlaylist(_articles_nodes);
|
||||||
};
|
};
|
||||||
function deactivateArticlesFilter(){
|
function deactivateArticlesFilter(){
|
||||||
//console.log('deactivateArticlesFilter');
|
//console.log('deactivateArticlesFilter');
|
||||||
@@ -796,6 +807,7 @@
|
|||||||
for (var i = 0; i < _no_articles_nodes.length; i++) {
|
for (var i = 0; i < _no_articles_nodes.length; i++) {
|
||||||
_no_articles_nodes[i].unFade();
|
_no_articles_nodes[i].unFade();
|
||||||
}
|
}
|
||||||
|
updateRandomPlaylist(_playlist);
|
||||||
};
|
};
|
||||||
function shutDownArticles(){
|
function shutDownArticles(){
|
||||||
// shutdown articles if active
|
// shutdown articles if active
|
||||||
|
|||||||
@@ -596,6 +596,7 @@
|
|||||||
//console.log('theme : onCorpusReady', e);
|
//console.log('theme : onCorpusReady', e);
|
||||||
_corpus_ready = true;
|
_corpus_ready = true;
|
||||||
_$corpus_canvas = $('canvas#corpus-map');
|
_$corpus_canvas = $('canvas#corpus-map');
|
||||||
|
|
||||||
_$corpus_canvas
|
_$corpus_canvas
|
||||||
.on('corpus-cliked-on-map', function(e) {
|
.on('corpus-cliked-on-map', function(e) {
|
||||||
//console.log('theme : corpus-cliked-on-map');
|
//console.log('theme : corpus-cliked-on-map');
|
||||||
@@ -609,7 +610,7 @@
|
|||||||
.openDocument(e.target_node);
|
.openDocument(e.target_node);
|
||||||
});
|
});
|
||||||
|
|
||||||
_randomPlayer = new RandomPlayer(e.playlist);
|
_randomPlayer = new RandomPlayer(e.playlist);
|
||||||
|
|
||||||
_$body.attr('corpus-map', 'ready');
|
_$body.attr('corpus-map', 'ready');
|
||||||
}
|
}
|
||||||
@@ -974,6 +975,15 @@
|
|||||||
.on('audio-ended', this.onAudioPlayerEnded.bind(this))
|
.on('audio-ended', this.onAudioPlayerEnded.bind(this))
|
||||||
.on('audio-play-next', this.onAudioPlayNext.bind(this))
|
.on('audio-play-next', this.onAudioPlayNext.bind(this))
|
||||||
.on('stop-shuffle', this.stop.bind(this));
|
.on('stop-shuffle', this.stop.bind(this));
|
||||||
|
|
||||||
|
|
||||||
|
_$corpus_canvas
|
||||||
|
.on('update-random-playlist', this.updatePlaylist.bind(this));
|
||||||
|
},
|
||||||
|
updatePlaylist(e){
|
||||||
|
// debugger;
|
||||||
|
this.playlist = e.playlist;
|
||||||
|
this.shuffle();
|
||||||
},
|
},
|
||||||
shuffle(){
|
shuffle(){
|
||||||
var tempPLaylist = [];
|
var tempPLaylist = [];
|
||||||
|
|||||||
@@ -596,6 +596,7 @@
|
|||||||
//console.log('theme : onCorpusReady', e);
|
//console.log('theme : onCorpusReady', e);
|
||||||
_corpus_ready = true;
|
_corpus_ready = true;
|
||||||
_$corpus_canvas = $('canvas#corpus-map');
|
_$corpus_canvas = $('canvas#corpus-map');
|
||||||
|
|
||||||
_$corpus_canvas
|
_$corpus_canvas
|
||||||
.on('corpus-cliked-on-map', function(e) {
|
.on('corpus-cliked-on-map', function(e) {
|
||||||
//console.log('theme : corpus-cliked-on-map');
|
//console.log('theme : corpus-cliked-on-map');
|
||||||
@@ -609,7 +610,7 @@
|
|||||||
.openDocument(e.target_node);
|
.openDocument(e.target_node);
|
||||||
});
|
});
|
||||||
|
|
||||||
_randomPlayer = new RandomPlayer(e.playlist);
|
_randomPlayer = new RandomPlayer(e.playlist);
|
||||||
|
|
||||||
_$body.attr('corpus-map', 'ready');
|
_$body.attr('corpus-map', 'ready');
|
||||||
}
|
}
|
||||||
@@ -974,6 +975,15 @@
|
|||||||
.on('audio-ended', this.onAudioPlayerEnded.bind(this))
|
.on('audio-ended', this.onAudioPlayerEnded.bind(this))
|
||||||
.on('audio-play-next', this.onAudioPlayNext.bind(this))
|
.on('audio-play-next', this.onAudioPlayNext.bind(this))
|
||||||
.on('stop-shuffle', this.stop.bind(this));
|
.on('stop-shuffle', this.stop.bind(this));
|
||||||
|
|
||||||
|
|
||||||
|
_$corpus_canvas
|
||||||
|
.on('update-random-playlist', this.updatePlaylist.bind(this));
|
||||||
|
},
|
||||||
|
updatePlaylist(e){
|
||||||
|
// debugger;
|
||||||
|
this.playlist = e.playlist;
|
||||||
|
this.shuffle();
|
||||||
},
|
},
|
||||||
shuffle(){
|
shuffle(){
|
||||||
var tempPLaylist = [];
|
var tempPLaylist = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user