Custom Content reference to enum.js

Are you having problems with using or developing a plugin? Let me know here.
Post Reply
Skibox
Posts: 152
Joined: Mon Apr 07, 2014 7:06 pm
Location: ESGG

Custom Content reference to enum.js

Post by Skibox » Sun Apr 13, 2014 12:18 am

I'm finding my way around the CC plugin and it's working nicely so far!

Question 1: I used the example VRS.globalOptions.aircraftMarkerAllowAltitudeStalk = false; to disable stalks and it works fine. But I would actually like to allow stalks, just turn them off by default. Is there a "aircraftMarkerShowAltitudeStalk" setting ?


Question 2: I created custom pin texts using

VRS.globalOptions.aircraftMarkerDefaultPinTexts = [
VRS.RenderProperty.Callsign,
VRS.RenderProperty.FlightLevel,
VRS.RenderProperty.Receiver, ];

That works beutifully, but then it says "The VRS.RenderProperty values are declared in enums.js." Where do I find enum.js ? In the source code or elsewhere ?
I would like to create custom "listPluginDefaultColumns", but need to know what the variables are called...


Thanks,

/M

agw
Posts: 2249
Joined: Fri Feb 17, 2012 3:20 am

Re: Custom Content reference to enum.js

Post by agw » Mon Apr 14, 2014 2:10 am

Yes, I really need to get around to documenting enums.js! :) It is in the source, it's in:

<PROGRAM FILES>\VirtualRadar\Web\script\vrs\enums.js

If you do a search for RenderProperty in there you'll see the different properties. Not all properties can be rendered on all surfaces - for example, you cannot render VRS.RenderProperty.Picture as pin text, or VRS.RenderProperty.RouteFull into the aircraft list. When I do eventually document enums.js I'll document which properties can be rendered where. For the time being you can tell which properties can be rendered where by looking at the appropriate drop-down list in the options.

One small note on the custom pin texts array that you posted - the comma after the final item in the array will work in most browsers but some browsers won't like it. To be safe you need to make sure the last item in the array doesn't have a comma after it.

There isn't an aircraftMarkerShowAltitudeStalk but there should be :) I'll add it for the next release.

Post Reply