aboutsummaryrefslogtreecommitdiff
path: root/app/js/controllers.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/js/controllers.js')
-rw-r--r--app/js/controllers.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/js/controllers.js b/app/js/controllers.js
index 11e6950..2230603 100644
--- a/app/js/controllers.js
+++ b/app/js/controllers.js
@@ -28,6 +28,19 @@ app.controller('pointCtrl', function($scope, $http, pathService){
// $scope.line=constList;
+ $scope.addNewSongToGraph = function(id, titre, link, duration)
+ {
+ var newSong = {
+ x:100,
+ y:100,
+ label:titre,
+ id:id,
+ link:link,
+ duration:duration
+ };
+ $scope.points.push(newSong);
+ };
+
$scope.getColor = function(point) {
if (playlist.indexOf(point) == -1) {