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/SPD-profile.symbol

40 lines
1.1 KiB
Text

# 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);
}
}