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
|
||||
});
|
||||
}
|
||||
//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){
|
||||
@@ -646,6 +640,19 @@
|
||||
// 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]);
|
||||
}
|
||||
}
|
||||
updateRandomPlaylist(_nodes_centered);
|
||||
createNodesRepulsions();
|
||||
};
|
||||
function highlightEntries(){
|
||||
@@ -725,6 +733,7 @@
|
||||
_nodes_centered.push(_nodes[n]);
|
||||
}
|
||||
}
|
||||
updateRandomPlaylist(_nodes_centered);
|
||||
createNodesRepulsions();
|
||||
};
|
||||
|
||||
@@ -738,6 +747,7 @@
|
||||
for (var i = 0; i < _nodes.length; i++) {
|
||||
_nodes[i].scramble();
|
||||
}
|
||||
updateRandomPlaylist(_playlist);
|
||||
// setTimeout(stopScrambling, 2000);
|
||||
// stopScrambling();
|
||||
};
|
||||
@@ -789,6 +799,7 @@
|
||||
for (var i = 0; i < _no_articles_nodes.length; i++) {
|
||||
_no_articles_nodes[i].fade();
|
||||
}
|
||||
updateRandomPlaylist(_articles_nodes);
|
||||
};
|
||||
function deactivateArticlesFilter(){
|
||||
//console.log('deactivateArticlesFilter');
|
||||
@@ -796,6 +807,7 @@
|
||||
for (var i = 0; i < _no_articles_nodes.length; i++) {
|
||||
_no_articles_nodes[i].unFade();
|
||||
}
|
||||
updateRandomPlaylist(_playlist);
|
||||
};
|
||||
function shutDownArticles(){
|
||||
// shutdown articles if active
|
||||
|
||||
@@ -170,12 +170,6 @@
|
||||
'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){
|
||||
@@ -646,6 +640,19 @@
|
||||
// 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]);
|
||||
}
|
||||
}
|
||||
updateRandomPlaylist(_nodes_centered);
|
||||
createNodesRepulsions();
|
||||
};
|
||||
function highlightEntries(){
|
||||
@@ -725,6 +733,7 @@
|
||||
_nodes_centered.push(_nodes[n]);
|
||||
}
|
||||
}
|
||||
updateRandomPlaylist(_nodes_centered);
|
||||
createNodesRepulsions();
|
||||
};
|
||||
|
||||
@@ -738,6 +747,7 @@
|
||||
for (var i = 0; i < _nodes.length; i++) {
|
||||
_nodes[i].scramble();
|
||||
}
|
||||
updateRandomPlaylist(_playlist);
|
||||
// setTimeout(stopScrambling, 2000);
|
||||
// stopScrambling();
|
||||
};
|
||||
@@ -789,6 +799,7 @@
|
||||
for (var i = 0; i < _no_articles_nodes.length; i++) {
|
||||
_no_articles_nodes[i].fade();
|
||||
}
|
||||
updateRandomPlaylist(_articles_nodes);
|
||||
};
|
||||
function deactivateArticlesFilter(){
|
||||
//console.log('deactivateArticlesFilter');
|
||||
@@ -796,6 +807,7 @@
|
||||
for (var i = 0; i < _no_articles_nodes.length; i++) {
|
||||
_no_articles_nodes[i].unFade();
|
||||
}
|
||||
updateRandomPlaylist(_playlist);
|
||||
};
|
||||
function shutDownArticles(){
|
||||
// shutdown articles if active
|
||||
|
||||
@@ -596,6 +596,7 @@
|
||||
//console.log('theme : onCorpusReady', e);
|
||||
_corpus_ready = true;
|
||||
_$corpus_canvas = $('canvas#corpus-map');
|
||||
|
||||
_$corpus_canvas
|
||||
.on('corpus-cliked-on-map', function(e) {
|
||||
//console.log('theme : corpus-cliked-on-map');
|
||||
@@ -609,7 +610,7 @@
|
||||
.openDocument(e.target_node);
|
||||
});
|
||||
|
||||
_randomPlayer = new RandomPlayer(e.playlist);
|
||||
_randomPlayer = new RandomPlayer(e.playlist);
|
||||
|
||||
_$body.attr('corpus-map', 'ready');
|
||||
}
|
||||
@@ -974,6 +975,15 @@
|
||||
.on('audio-ended', this.onAudioPlayerEnded.bind(this))
|
||||
.on('audio-play-next', this.onAudioPlayNext.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(){
|
||||
var tempPLaylist = [];
|
||||
|
||||
@@ -596,6 +596,7 @@
|
||||
//console.log('theme : onCorpusReady', e);
|
||||
_corpus_ready = true;
|
||||
_$corpus_canvas = $('canvas#corpus-map');
|
||||
|
||||
_$corpus_canvas
|
||||
.on('corpus-cliked-on-map', function(e) {
|
||||
//console.log('theme : corpus-cliked-on-map');
|
||||
@@ -609,7 +610,7 @@
|
||||
.openDocument(e.target_node);
|
||||
});
|
||||
|
||||
_randomPlayer = new RandomPlayer(e.playlist);
|
||||
_randomPlayer = new RandomPlayer(e.playlist);
|
||||
|
||||
_$body.attr('corpus-map', 'ready');
|
||||
}
|
||||
@@ -974,6 +975,15 @@
|
||||
.on('audio-ended', this.onAudioPlayerEnded.bind(this))
|
||||
.on('audio-play-next', this.onAudioPlayNext.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(){
|
||||
var tempPLaylist = [];
|
||||
|
||||
Reference in New Issue
Block a user