VRS.RenderProperty.Silhouette

Discussions about the preview versions of Virtual Radar Server.
Forum rules
Please bear in mind if you do install a preview version that it is unfinished code, there may be bugs, bits missing, things that don't work etc.

Posts in this forum will not show up in forum search results. Old threads will be pruned occasionally.
Post Reply
egpd1701
Posts: 49
Joined: Fri Nov 08, 2013 3:39 pm

VRS.RenderProperty.Silhouette

Post by egpd1701 » Sun Jun 23, 2019 9:13 am

Hi

Just changed to the 12-06-19 preview from the previous one and my custom silhouette's are not working, my custom Types aren't working but my custom logos are.

Nothing has changed in my code

Can you please tell me what has changed in your code so I can change my code to my thing right again.
if(VRS && VRS.globalDispatch && VRS.serverConfig) {
VRS.globalDispatch.hook(VRS.globalEvent.bootstrapCreated, function(bootStrap) {
if(VRS.renderPropertyHandlers) {
// Overwrite the standard operator flag renderer with a custom one.
// THIS MIGHT NEED TO BE MODIFIED WHEN NEW VERSIONS OF VRS ARE RELEASED
VRS.renderPropertyHandlers[VRS.RenderProperty.Silhouette] = new VRS.RenderPropertyHandler({
property: VRS.RenderProperty.Silhouette,
surfaces: VRS.RenderSurface.List + VRS.RenderSurface.DetailHead + VRS.RenderSurface.InfoWindow,
headingKey: 'ListOperator',
labelKey: 'Operator',
sortableField: VRS.AircraftListSortableField.OperatorIcao,
headingAlignment: VRS.Alignment.Centre,
suppressLabelCallback: function() { return true; },
fixedWidth: function() { return VRS.globalOptions.aircraftOperatorFlagSize.width.toString() + 'px'; },
// Changed the following line to redraw the flag if the manufacturer changes...
hasChangedCallback: function(aircraft) { return aircraft.modelIcao.chg || aircraft.icao.chg || aircraft.registration.chg || aircraft.manufacturer.chg; },
// And changed this line to call our custom function to build the <img> tag instead of the standard one...
renderCallback: function(aircraft) { return customFormatTypeIcaoImageHtml(aircraft); },
tooltipChangedCallback: function(aircraft) { return aircraft.modelIcao.chg || aircraft.operator.chg; },
tooltipCallback: function(aircraft) { return aircraft.formatModelIcaoNameAndDetail(); }
});

}
});
}

function customFormatTypeIcaoImageHtml(aircraft)
{
var codeToUse = '';
codeToUse = customPipeSeparatedCode(codeToUse, aircraft.modelIcao.val + '-' + aircraft.operatorIcao.val);
codeToUse = customPipeSeparatedCode(codeToUse, aircraft.modelIcao.val);
codeToUse = customPipeSeparatedCode(codeToUse, aircraft.manufacturer.val);
codeToUse = customPipeSeparatedCode(codeToUse, aircraft.operatorIcao.val);
codeToUse = customPipeSeparatedCode(codeToUse, aircraft.registration.val);
codeToUse = customPipeSeparatedCode(codeToUse, aircraft.icao.val);


The above doesn't work anymore

egpd1701
Posts: 49
Joined: Fri Nov 08, 2013 3:39 pm

Re: VRS.RenderProperty.Silhouette

Post by egpd1701 » Sun Jun 23, 2019 9:24 am

As an edit

All is working on the reports just not on the main display.

Ans the map drawing algorithm is much worse on this version than the other one - so much lag now. Its really bad

egpd1701
Posts: 49
Joined: Fri Nov 08, 2013 3:39 pm

Re: VRS.RenderProperty.Silhouette

Post by egpd1701 » Sun Jun 23, 2019 3:20 pm

OK, now its fixed itself - no reboots or anything, just working again - the map clipping is still awful though.

Post Reply