This repository has been archived on 2021-09-26. You can view files and clone it, but cannot push or open issues or pull requests.
IDG-A32X/Models/Instruments/ND/canvas/map/DECEL.symbol

33 lines
900 B
Text
Raw Normal View History

2017-06-19 00:14:41 +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 {
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);
}
var draw = func{
if(me.decel_grp != nil){
var spd_ctrl = getprop(me.options.spd_ctrl);
var spd_managed = (spd_ctrl == me.options.managed_val);
if(spd_managed)
me.decel_grp.setColor(me.style.managed_color);
else
me.decel_grp.setColor(me.style.selected_color);
}
}