2019-10-14 16:48:35 +00:00
|
|
|
# See: http://wiki.flightgear.org/MapStructure
|
|
|
|
# Class things:
|
|
|
|
var name = 'DECEL';
|
|
|
|
var parents = [canvas.DotSym];
|
|
|
|
var __self__ = caller(0)[0];
|
|
|
|
canvas.DotSym.makeinstance( name, __self__ );
|
|
|
|
|
|
|
|
#canvas.SymbolLayer.get(name).df_style = {
|
|
|
|
# radius: 13,
|
|
|
|
#};
|
|
|
|
|
|
|
|
var element_type = "group";
|
|
|
|
|
|
|
|
var init = func {
|
2019-12-29 21:37:52 +00:00
|
|
|
var svg_path = me.getStyle('svg_path');
|
|
|
|
if(svg_path == nil)
|
|
|
|
svg_path = get_local_path('res/airbus_decel.svg');
|
|
|
|
me.decel_grp = me.element.createChild("group","decel");
|
|
|
|
canvas.parsesvg(me.decel_grp, svg_path);
|
|
|
|
me.decel_grp.set('z-index', 5);
|
2019-10-14 16:48:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
var draw = func{
|
2019-12-29 21:37:52 +00:00
|
|
|
if(me.decel_grp != nil){
|
|
|
|
var spd_ctrl = getprop(me.options.spd_ctrl);
|
2021-08-03 15:56:35 +00:00
|
|
|
if(spd_ctrl)
|
2019-12-29 21:37:52 +00:00
|
|
|
me.decel_grp.setColor(me.style.managed_color);
|
|
|
|
else
|
|
|
|
me.decel_grp.setColor(me.style.selected_color);
|
|
|
|
}
|
2019-10-14 16:48:35 +00:00
|
|
|
}
|