 		
 		# if @_running is true
 		# 	throw Error "Animation.start #{@animationName} already running"
-		# 
+		#
 		# @_running = true
 
 		# TODO: test if we are trying to animate something that cannot animate

		
		# Pre-calculate the delta values
		for propertyName, value of @propertiesA
			deltas[propertyName] = (@propertiesB[propertyName] - @propertiesA[propertyName]) / 100.0
		
		# We define this object outside of the loop to re-use it. In theory this should help a 
		# bit with perfomance, in practise I'm too lazy to prove it.
		m = new Matrix()
		
		for springValue in @curveValues

			console.log "Animation.parseCurve: could not parse curve '#{curve}'"
			return bezier.defaults.Linear @precision, @time

	graphView: (animation, x, y, h, time) ->
	
		color = "rgba(50,150,200,.35)"
		values = animation.curveValues
		
		width = 300
	
		graph = new View
			y: y
			x: x
			width:100
			height:h
	
		# graph.style.backgroundColor = "rgba(0, 0, 0, 1)"
		graph.clip = false
		
		background = new View
			y: 0 - h
			height:h * 2 + 3
			superView: graph
		
		background.style.backgroundColor = "rgba(255,255,255,.85)"
			
		
		for value, i in values
			dot = new View
				width:3, height:3
				x: i * widthFactor, y: (100 - value) * (h / 100)
				superView: graph
			dot.style.borderRadius = "5px"
			dot.style.backgroundColor = color

		graph.width = dot.x
		background.width = dot.x

		if time
			player = new View
				x:0, y:-h
				width: 2, height: h * 2
				superView: graph
	
			player.style.backgroundColor = color
		
			player.animate
				properties: {x:graph.width}
				time: time

		return graph



exports.Animation = Animation