Skip to content

Commit

Permalink
[Vega] Sample [Flights] Airport Connections (Hover Over Airport) visu…
Browse files Browse the repository at this point in the history
…alization not working (elastic#53799) (elastic#53857)

Closes: elastic#53748

Co-authored-by: Elastic Machine <[email protected]>

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
alexwizp and elasticmachine authored Jan 1, 2020
1 parent 12389f0 commit 4cbc5b7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
9 changes: 8 additions & 1 deletion src/legacy/core_plugins/tile_map/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ const tileMapPluginInitializer: LegacyPluginInitializer = ({ Plugin }: LegacyPlu
uiExports: {
styleSheetPaths: resolve(__dirname, 'public/index.scss'),
hacks: [resolve(__dirname, 'public/legacy')],
injectDefaultVars: server => ({}),
injectDefaultVars: server => {
const serverConfig = server.config();
const mapConfig: Record<string, any> = serverConfig.get('map');

return {
emsTileLayerId: mapConfig.emsTileLayerId,
};
},
},
config(Joi: any) {
return Joi.object({
Expand Down
12 changes: 9 additions & 3 deletions src/legacy/core_plugins/vis_type_vega/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,15 @@ const vegaPluginInitializer: LegacyPluginInitializer = ({ Plugin }: LegacyPlugin
uiExports: {
styleSheetPaths: resolve(__dirname, 'public/index.scss'),
hacks: [resolve(__dirname, 'public/legacy')],
injectDefaultVars: server => ({
enableExternalUrls: server.config().get('vega.enableExternalUrls'),
}),
injectDefaultVars: server => {
const serverConfig = server.config();
const mapConfig: Record<string, any> = serverConfig.get('map');

return {
emsTileLayerId: mapConfig.emsTileLayerId,
enableExternalUrls: serverConfig.get('vega.enableExternalUrls'),
};
},
},
init: (server: Legacy.Server) => ({}),
config(Joi: any) {
Expand Down

0 comments on commit 4cbc5b7

Please sign in to comment.