Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/n8rzz/atc into feature/A…
Browse files Browse the repository at this point in the history
…TC-134

Conflicts:
- CHANGELOG.md
  • Loading branch information
n8rzz committed Dec 19, 2016
2 parents 2e4cb1b + 1d8e2ab commit dad8644
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 2,999 deletions.
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Deprecates `sid` and `star` properties of the `AirportModel` in favor of `sidCollection` and `starCollection` [#54](https://github.com/n8rzz/atc/issues/54)
- Adds [Express](expressjs.com) server to serve static assets and add [travis](travis-ci.org) config file for travis continuous integration [#169](https://github.com/n8rzz/atc/issues/169)
- Rewrites the CommandParser from the ground up [#114](https://github.com/n8rzz/atc/issues/114)
- Removes `Pegjs` and references completing switch to new CommandParser [#216](https://github.com/n8rzz/atc/issues/216)



Expand All @@ -27,10 +28,12 @@
- Updates `PositionModel` to run all calculations through the static `.calculatePosition()` method and vastly simplifies internal logic.
- Refactors the the function names in `FixCollection` to better fit their function. `init()` to `addItems()` and `destroy()` to `removeItems()` [#186] (https://github.com/n8rzz/atc/issues/186)
- Adds gulp-cli and adds [tools readme](tools/README.md) link to gulp issues with Windows [#194](https://github.com/n8rzz/atc/issues/194)
- Changes `routeString` to `routeCode` to better fit what it is and also fixs trancpercy in to the `routeModel` [#188] (https://github.com/n8rzz/atc/issues/188)
-.toUpperCase() is now called on intilization and removed from the getter
- Prevents collision detection for aircraft that are outside of our airspace [#134](https://github.com/n8rzz/atc/issues/134)
- Originally reported under [#736](https://github.com/zlsa/atc/issues/736)
- Changes `routeString` to `routeCode` in `routeModel` [#188] (https://github.com/n8rzz/atc/issues/188)
-`.toUpperCase()` is now called on initialization and removed from the getter
- Escape clears commands but not callsign if commands are present [#211] (https://github.com/n8rzz/atc/issues/211)
- Originally reported under [#763](https://github.com/zlsa/atc/issues/763)



Expand Down Expand Up @@ -77,4 +80,4 @@
- Updates `FixCollection.findFixByName()` to accept upper, mixed, or lower case fix name [#109](https://github.com/n8rzz/atc/issues/109)
- Switching to a previously loaded airport does not clear previous airport fixes [#115](https://github.com/n8rzz/atc/issues/115)
- Fixes `parseElevation()` so that it does not return NaN when it is given the string `'Infinity'` [#191] (https://github.com/n8rzz/atc/issues/191)
- Originally reported under [#756](https://github.com/zlsa/atc/issues/756)
- Originally reported under [#756](https://github.com/zlsa/atc/issues/756)
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
"express": "^4.14.0",
"jquery": "^3.1.0",
"lodash": "^4.15.0",
"pegjs": "^0.9.0",
"raf": "^3.3.0"
},
"devDependencies": {
Expand Down
5 changes: 0 additions & 5 deletions src/assets/scripts/App.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import $ from 'jquery';
import peg from 'pegjs';
import ContentQueue from './contentQueue/ContentQueue';
import LoadingView from './LoadingView';
import AirportController from './airport/AirportController';
Expand All @@ -13,7 +12,6 @@ import { speech_init } from './speech';
import { time, calculateDeltaTime } from './utilities/timeHelpers';
import { LOG } from './constants/logLevel';

window.peg = peg;
window.zlsa = {};
window.zlsa.atc = {};
const prop = {};
Expand All @@ -23,9 +21,6 @@ const prop = {};
// This will need to be re-worked, and current global functions should be exported and
// imported as needed in each file.
require('./util');
// this module doesnt appear to be in use anywhere
// require('./animation');
require('./parser');

// saved as this.prop.version and this.prop.version_string
const VERSION = [3, 2, 0];
Expand Down
16 changes: 13 additions & 3 deletions src/assets/scripts/InputController.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ export default class InputController {
this.input = input;
this.input.command = '';
this.input.callsign = '';
this.input.data = '';
// this.input.data = '';
this.input.history = [];
this.input.history_item = null;
this.input.click = [0, 0];
Expand Down Expand Up @@ -286,7 +286,9 @@ export default class InputController {

if (nearest[0]) {
if (nearest[1] < window.uiController.px_to_km(80)) {
this.input_select(nearest[0].getCallsign().toUpperCase());
this.input.callsign = nearest[0].getCallsign().toUpperCase();

this.input_select(this.input.callsign);
} else {
this.input_select();
}
Expand Down Expand Up @@ -576,8 +578,16 @@ export default class InputController {
break;

case KEY_CODES.ESCAPE:
const currentCommandValue = this.$commandInput.val();

// if the current commandInput value contains a callsign and commands, only clear the commands
if (currentCommandValue.trim() !== this.input.callsign) {
this.$commandInput.val(`${this.input.callsign} `);

return;
}

this.$commandInput.val('');
e.preventDefault();

break;
default:
Expand Down
Loading

0 comments on commit dad8644

Please sign in to comment.