MCPcopy Create free account
hub / github.com/facebook/Rapid / render

Method render

modules/core/UiSystem.js:243–275  ·  view source on GitHub ↗

* render * Renders the Rapid user interface into the main container. * Note that most `render` functions accept a parent selection, * this one doesn't need it - `$container` is always the parent.

()

Source from the content-addressed store, hash-verified

241 * this one doesn't need it - `$container` is always the parent.
242 */
243 render() {
244 const context = this.context;
245 const l10n = context.systems.l10n;
246 const map = context.systems.map;
247 const $container = context.container();
248
249 $container
250 .attr('lang', l10n.localeCode())
251 .attr('dir', l10n.textDirection())
252 .call(this.Fullscreen.render)
253 .call(this.Defs.render)
254 .call(this.Sidebar.render);
255
256 // .main-content
257 // Contains the map and everything floating above it, such as toolbars, etc.
258 let $mainContent = $container.selectAll('.main-content')
259 .data([0]);
260
261 // enter
262 const $$mainContent = $mainContent.enter()
263 .append('div')
264 .attr('class', 'main-content active');
265
266 // update
267 $mainContent = $mainContent.merge($$mainContent);
268
269 $mainContent
270 .call(map.render)
271 .call(this.MapToolbar.render)
272 .call(this.Overmap.render)
273 .call(this.ApiStatus.render)
274 .call(this.MapFooter.render);
275 }
276
277
278 /*

Callers 4

initAsyncMethod · 0.95
startAsyncMethod · 0.95
_appMethod · 0.45
_drawMethod · 0.45

Calls 6

textDirectionMethod · 0.80
dataMethod · 0.80
containerMethod · 0.45
localeCodeMethod · 0.45
enterMethod · 0.45
mergeMethod · 0.45

Tested by

no test coverage detected