shuffle player only on acive items in the map (entree, article, search results

This commit is contained in:
2018-04-17 16:21:46 +02:00
parent 29ad08648f
commit 07728aa425
4 changed files with 58 additions and 14 deletions
@@ -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