| 8359 | }; |
| 8360 | // Create canvas elements for map and deck |
| 8361 | function createCanvas(props) { |
| 8362 | let { container =document.body } = props; |
| 8363 | if (typeof container === "string") container = document.getElementById(container); |
| 8364 | if (!container) throw Error("Deck: container not found"); |
| 8365 | // Add DOM elements |
| 8366 | const containerStyle = window.getComputedStyle(container); |
| 8367 | if (containerStyle.position === "static") container.style.position = "relative"; |
| 8368 | const deckCanvas = document.createElement("canvas"); |
| 8369 | container.appendChild(deckCanvas); |
| 8370 | Object.assign(deckCanvas.style, CANVAS_STYLE); |
| 8371 | return { |
| 8372 | container, |
| 8373 | deckCanvas |
| 8374 | }; |
| 8375 | } |
| 8376 | function createDeckGLClassesForPresenter(factoryOptions) { |
| 8377 | const OrbitControllerClass = (0, _orbitController.createOrbitControllerClass)(factoryOptions); |
| 8378 | //dynamic superclass lets us create a subclass at execution phase instead of declaration phase. |