1
0
Fork 0
A320-family/Models/Instruments/ND/canvas/map/SPD-profile.symbol

41 lines
1.1 KiB
Text
Raw Normal View History

2019-10-14 16:48:35 +00:00
# See: http://wiki.flightgear.org/MapStructure
# Class things:
var name = 'SPD-profile';
var parents = [canvas.SVGSymbol];
var __self__ = caller(0)[0];
canvas.DotSym.makeinstance( name, __self__ );
#canvas.SymbolLayer.get(name).df_style = {
# radius: 13,
#};
var element_type = "group";
var svg_path = get_local_path('res/airbus_spd_limit.svg');
var spd_sym = nil;
#var init = func {
# var name = me.model.getName();
# #var radius = me.style.radius;
# var sym_group = me.element.createChild("group", name);
# sym_group.set("z-index",5);
# var color = me.getStyle('color');
# var spd_path = sym_group.createChild("path").
# setStrokeLineWidth(3).
# moveTo(-17,0).
# arcSmallCW(17,17,0,34,0).
# arcSmallCW(17,17,0,-34,0).
# setColor(color).
# setColorFill(color).
# set("z-index",5);
#}
var draw = func{
# var name = me.model.getName();
# var sym_group = me.element.getElementById(name);
# sym_group.set('z-index', 5);
if(me.spd_sym == nil){
me.spd_sym = me.getElementById("airbus-spd-sym");
me.spd_sym.setTranslation(-24, -24).set('z-index', 5);
}
2019-10-14 16:48:35 +00:00
}