Page 1 of 1

VRS.RenderProperty.Silhouette

Posted: Sun Jun 23, 2019 9:13 am
by egpd1701
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

Re: VRS.RenderProperty.Silhouette

Posted: Sun Jun 23, 2019 9:24 am
by egpd1701
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

Re: VRS.RenderProperty.Silhouette

Posted: Sun Jun 23, 2019 3:20 pm
by egpd1701
OK, now its fixed itself - no reboots or anything, just working again - the map clipping is still awful though.