MCPcopy Create free account
hub / github.com/microsoft/SandDance / wrapper

Function wrapper

packages/vega-deck.gl/src/deck.gl-classes/orbitController.ts:12–36  ·  view source on GitHub ↗
(props: any)

Source from the content-addressed store, hash-verified

10export function createOrbitControllerClass(factoryOptions: OrbitControllerClassOptions): typeof OrbitController_Class {
11
12 function wrapper(props: any) {
13
14 class OrbitControllerInternal extends base.deck.OrbitController {
15 public invertPan: boolean;
16 public dragRotate: boolean;
17
18 constructor(props: any) {
19 super(props);
20 this.invertPan = true;
21 }
22
23 handleEvent(event: MouseEvent) {
24 if (event.type === 'doubletap') {
25 if (factoryOptions && factoryOptions.doubleClickHandler) {
26 return factoryOptions.doubleClickHandler(event, this);
27 }
28 }
29 return super.handleEvent(event);
30 }
31 }
32
33 const instance = new OrbitControllerInternal(props) as OrbitController;
34
35 return instance;
36 }
37
38 return wrapper as any;
39}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected