Accidental global functions
This commit is contained in:
		
							parent
							
								
									5ed407c69d
								
							
						
					
					
						commit
						43f725e61a
					
				| 
						 | 
				
			
			@ -57,14 +57,14 @@ jQuery.fn.springy = function(params) {
 | 
			
		|||
	});
 | 
			
		||||
 | 
			
		||||
	// convert to/from screen coordinates
 | 
			
		||||
	toScreen = function(p) {
 | 
			
		||||
	var toScreen = function(p) {
 | 
			
		||||
		var size = currentBB.topright.subtract(currentBB.bottomleft);
 | 
			
		||||
		var sx = p.subtract(currentBB.bottomleft).divide(size.x).x * canvas.width;
 | 
			
		||||
		var sy = p.subtract(currentBB.bottomleft).divide(size.y).y * canvas.height;
 | 
			
		||||
		return new Springy.Vector(sx, sy);
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
	fromScreen = function(s) {
 | 
			
		||||
	var fromScreen = function(s) {
 | 
			
		||||
		var size = currentBB.topright.subtract(currentBB.bottomleft);
 | 
			
		||||
		var px = (s.x / canvas.width) * size.x + currentBB.bottomleft.x;
 | 
			
		||||
		var py = (s.y / canvas.height) * size.y + currentBB.bottomleft.y;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user