code: function _drawVector(canvas, ctx, params, path) {
  	var l, angle, length,
  		offsetX, offsetY,
  		x, y,
  		x3, y3,
  		x4, y4;
  
  	// Determine offset from dragging
  	if (params === path) {
  		offsetX = 0;
  		offsetY = 0;
  	} else {
  		offsetX = params.x;
  		offsetY = params.y;
  	}
  
  	l = 1;
  	x = x3 = x4 = path.x + offsetX;
  	y = y3 = y4 = path.y + offsetY;
  
  	_addStartArrow(
  		canvas, ctx,
  		params, path,
  		x + _getVectorX(params, path.a1, path.l1),
  		y + _getVectorY(params, path.a1, path.l1),
  		x,
  		y
  	);
  
  	// The vector starts at the given (x, y) coordinates
  	if (path.x !== undefined && path.y !== undefined) {
  		ctx.moveTo(x, y);
  	}
  	while (true) {
  
  		angle = path['a' + l];
  		length = path['l' + l];
  
  		if (angle !== undefined && length !== undefined) {
  			// Convert the angle to radians with 0 degrees starting at north
  			// Keep track of last two coordinates
  			x3 = x4;
  			y3 = y4;
  			// Compute (x, y) coordinates from angle and length
  			x4 += _getVectorX(params, angle, length);
  			y4 += _getVectorY(params, angle, length);
  			ctx.lineTo(x4, y4);
  			l += 1;
  		} else {
  			// Otherwise, stop drawing
  			break;
  		}
  
  	}
  	_addEndArrow(
  		canvas, ctx,
  		params, path,
  		x3, y3,
  		x4, y4
  	);
  }
docs: Draws vector (internal) #2