* 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.
()
| 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 | /* |
no test coverage detected