a9576e8c8d
- get rid of global variables and use instance variables - identified all important drawing routines and move them into *.draw files - changed to dynamic loading of *.draw *.model and *.layer files - implemented poor-man's controller hash to move use-case specific conditionals out of the draw files, and back into the instantiation, i.e. Gijs' EFIS class - started identifying stuff that is not specific to drawing, but to what is to be drawn, i.e. Model stuff - such as positioned queries, moved those out into *.model files - some more work on supporting more than a single ND MFD instance per aircraft - renamed a handful of SVG identifiers to avoid naming conflicts and to simplify usage of SVG IDs as member fields - moved all of the setlistener setup out of the fdm-initialized stub right into the ctor of the Efis class (actually that's controller stuff...) - initial MapStructure framework - aircraft-agnostic NavDisplay class - preparations for deprecating map.nas - additions to canvas.map - preparations for making NDStyles configurable via XML
26 lines
672 B
Text
26 lines
672 B
Text
var FixModel = {};
|
|
FixModel.new = func make( LayerModel, FixModel );
|
|
|
|
FixModel.init = func {
|
|
me._view.reset(); # wraps removeAllChildren() ATM
|
|
|
|
#fgcommand('profiler-start');
|
|
#me._view._view.removeAllChildren(); # clear the "real" canvas drawables
|
|
#fgcommand('profiler-stop');
|
|
#me.clear();
|
|
|
|
#debug.dump( me._controller) ;
|
|
#print("Query range is:", me._controller['query_range']() );
|
|
|
|
var results = positioned.findWithinRange( me._controller['query_range']()*2 ,"fix");
|
|
foreach(result; results) {
|
|
me.push(result);
|
|
}
|
|
|
|
#print("query range was:", me._controller['query_range']()*2);
|
|
#print("total fixes in results/model:", size(results));
|
|
|
|
me.notifyView();
|
|
}
|
|
|
|
|