(props)
| 8383 | * @params controller (Object) - Controller class. Leave empty for auto detection |
| 8384 | */ class DeckGLInternal extends (0, _base.base).deck.Deck { |
| 8385 | constructor(props){ |
| 8386 | if (typeof document === "undefined") // Not browser |
| 8387 | throw Error("Deck can only be used in the browser"); |
| 8388 | const { deckCanvas } = createCanvas(props); |
| 8389 | const viewState = props.initialViewState || props.viewState || {}; |
| 8390 | super(Object.assign({}, props, { |
| 8391 | width: "100%", |
| 8392 | height: "100%", |
| 8393 | canvas: deckCanvas, |
| 8394 | controller: OrbitControllerClass, |
| 8395 | initialViewState: viewState |
| 8396 | })); |
| 8397 | // Callback for the controller |
| 8398 | this._updateViewState = (params)=>{ |
| 8399 | if (this.onViewStateChange) this.onViewStateChange(params); |
| 8400 | }; |
| 8401 | } |
| 8402 | setProps(props) { |
| 8403 | // this._updateViewState must be bound to `this` |
| 8404 | // but we don't have access to the current instance before calling super(). |
nothing calls this directly
no test coverage detected