Don't calculate info if same or heading
This commit is contained in:
		| @@ -15,6 +15,7 @@ $(document).ready(function() { | |||||||
| 		$('#calctnd').click(function() { | 		$('#calctnd').click(function() { | ||||||
| 			removeEntity('arrow'); | 			removeEntity('arrow'); | ||||||
| 			lastInputBox = null; | 			lastInputBox = null; | ||||||
|  | 			if ( $('#pointa  option:selected').text() != $('#pointb  option:selected').text() && (!$('#pointa  option:selected').text().match("[=.] (.+) [=.]") && !$('#pointb  option:selected').text().match("[=.] (.+) [=.]"))) { | ||||||
| 			$('#cal_start').html( $('#pointa  option:selected').text() ); | 			$('#cal_start').html( $('#pointa  option:selected').text() ); | ||||||
| 			$('#cal_end').html( $('#pointb  option:selected').text() ); | 			$('#cal_end').html( $('#pointb  option:selected').text() ); | ||||||
| 			$('#cal_speed').html( $('#speed').val() +" " + $('#speedunit option:selected').val() ); | 			$('#cal_speed').html( $('#speed').val() +" " + $('#speedunit option:selected').val() ); | ||||||
| @@ -22,7 +23,6 @@ $(document).ready(function() { | |||||||
| 			var eta = calcETA({'speed': $('#speed').val(), 'unit':  $('#speedunit option:selected').val()},dist) | 			var eta = calcETA({'speed': $('#speed').val(), 'unit':  $('#speedunit option:selected').val()},dist) | ||||||
| 			$('#cal_eta').html( timeformat(eta) ); | 			$('#cal_eta').html( timeformat(eta) ); | ||||||
| 			$('#cal_dist').html( dist.toFixed(2) + " PC"); | 			$('#cal_dist').html( dist.toFixed(2) + " PC"); | ||||||
| 			if ( $('#pointa  option:selected').text() != $('#pointb  option:selected').text() ) { |  | ||||||
| 			drawline(grabPositionByName($('#pointa  option:selected').text()),grabPositionByName($('#pointb  option:selected').text())); | 			drawline(grabPositionByName($('#pointa  option:selected').text()),grabPositionByName($('#pointb  option:selected').text())); | ||||||
| 			} | 			} | ||||||
| 		}); | 		}); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user