20,741
edits
mNo edit summary |
|||
Line 270: | Line 270: | ||
<syntaxhighlight lang="nasal"> | <syntaxhighlight lang="nasal"> | ||
{ name:'AA', isMapStructure:1, update_on:['toggle_range','toggle_display_mode'], | { name:'AA', isMapStructure:1, update_on:['toggle_range','toggle_display_mode'], | ||
predicate: func(nd, layer) { | |||
# toggle visibility here | |||
var visible=nd.in_mode('toggle_display_mode', ['MAP']); | |||
layer.group.setVisible( visible ); | |||
if (visible) { | |||
#print("Updating MapStructure ND layer: AA"); | |||
layer.update(); | |||
} | |||
}, # end of layer update predicate | |||
'z-index': 1, | |||
}, # end of AA layer | |||
</syntaxhighlight> | </syntaxhighlight> | ||