From 07c60507079028545c948ec709e7b106d06c7baa Mon Sep 17 00:00:00 2001 From: Torsten Dreyer Date: Wed, 8 Jul 2015 13:27:54 +0200 Subject: [PATCH] Phi-Map: cleanup aircraft icon strip anything but the svg element from the loaded icon file --- Phi/widgets/map.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Phi/widgets/map.js b/Phi/widgets/map.js index e317762dc..d926379d8 100644 --- a/Phi/widgets/map.js +++ b/Phi/widgets/map.js @@ -7,6 +7,11 @@ define( function ViewModel(params, componentInfo) { var self = this; + { // extract element from image xml (strip pi) + var xmlDoc = jquery.parseXML( aircraftSvg ); + aircraftSvg = jquery( xmlDoc ).find("svg")[0].outerHTML; + } + self.element = componentInfo.element; self.followAircraft = ko.observable(true);