aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Odersky <jodersky@gmail.com>2014-05-11 14:35:27 +0200
committerJakob Odersky <jodersky@gmail.com>2014-05-11 14:35:27 +0200
commitc0b0cf5377efeb9889470c57124ceae794de7dd6 (patch)
tree27628b9463f9a62793c1f823515df562d098bbc9
parenta40daca44faa17938d194f35ab61d3f03d19312c (diff)
parentdac66c4f4609f33e7b50d45b2043166314c2beba (diff)
downloadplayGraph-c0b0cf5377efeb9889470c57124ceae794de7dd6.tar.gz
playGraph-c0b0cf5377efeb9889470c57124ceae794de7dd6.tar.bz2
playGraph-c0b0cf5377efeb9889470c57124ceae794de7dd6.zip
Merge branch 'master' of github.com:jodersky/playGraph
-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) {