[Solved] Colored Aircraft SVG Icons

Are you having problems with using or developing a plugin? Let me know here.
Post Reply
pakon
Posts: 17
Joined: Tue Sep 08, 2020 11:32 am
Location: Berlin, Germany
Contact:

[Solved] Colored Aircraft SVG Icons

Post by pakon »

Hey all,

According to the last beta release, it's possible to change the color of the aircraft icons. https://github.com/vradarserver/vrs-cus ... 20Criteria

It is working but with one case, I've an Problem. I want to colorize all military aircraft in grey. But my switch is not working. The datatype of this value is boolean. In this case, neither `case '1'` nor `case 'true'` are working.

Code: Select all

         switch(aircraft.isMilitary.val) {
                case 'true':
                normal = '#000000';
                selected = '#5AA800';
                break;
         }
// EDIT:

Code: Select all

         switch(aircraft.isMilitary.val) {
                case true:
                normal = '#000000';
                selected = '#5AA800';
                break;
         }
This works. Seems that case interprets true as a string when it's surrounded by ''

Thanks and cheers,
Pakon
Post Reply