@cosmos.gl/graph 3.0.0-beta.2 → 3.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config.d.ts +5 -5
- package/dist/index.d.ts +2 -1
- package/dist/index.js +6417 -15
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +53 -30
- package/dist/index.min.js.map +1 -1
- package/package.json +2 -2
- package/dist/index-C5QFXagg.js +0 -19915
- package/dist/index-C5QFXagg.js.map +0 -1
- package/dist/webgl-device-Dfa4MRJu.js +0 -3933
- package/dist/webgl-device-Dfa4MRJu.js.map +0 -1
package/dist/config.d.ts
CHANGED
|
@@ -383,13 +383,13 @@ export interface GraphConfigInterface {
|
|
|
383
383
|
/**
|
|
384
384
|
* Callback function that will be called when a point appears under the mouse
|
|
385
385
|
* as a result of a mouse event, zooming and panning, or movement of points.
|
|
386
|
-
* The point index will be passed as the first argument, position as the second argument
|
|
387
|
-
*
|
|
388
|
-
*
|
|
389
|
-
* | D3ZoomEvent<HTMLCanvasElement, undefined> | undefined) => void`.
|
|
386
|
+
* The point index will be passed as the first argument, position as the second argument,
|
|
387
|
+
* the corresponding mouse event or D3's zoom event as the third argument, and whether
|
|
388
|
+
* the hovered point is selected as the fourth argument:
|
|
389
|
+
* `(index: number, pointPosition: [number, number], event: MouseEvent | D3DragEvent<HTMLCanvasElement, undefined, Hovered> | D3ZoomEvent<HTMLCanvasElement, undefined> | undefined, isSelected: boolean) => void`.
|
|
390
390
|
* Default value: `undefined`
|
|
391
391
|
*/
|
|
392
|
-
onPointMouseOver?: (index: number, pointPosition: [number, number], event: MouseEvent | D3DragEvent<HTMLCanvasElement, undefined, Hovered> | D3ZoomEvent<HTMLCanvasElement, undefined> | undefined) => void;
|
|
392
|
+
onPointMouseOver?: (index: number, pointPosition: [number, number], event: MouseEvent | D3DragEvent<HTMLCanvasElement, undefined, Hovered> | D3ZoomEvent<HTMLCanvasElement, undefined> | undefined, isSelected: boolean) => void;
|
|
393
393
|
/**
|
|
394
394
|
* Callback function that will be called when a point is no longer underneath
|
|
395
395
|
* the mouse pointer because of a mouse event, zoom/pan event, or movement of points.
|
package/dist/index.d.ts
CHANGED
|
@@ -4,12 +4,13 @@ import { GraphData } from './modules/GraphData';
|
|
|
4
4
|
export declare class Graph {
|
|
5
5
|
config: GraphConfig;
|
|
6
6
|
graph: GraphData;
|
|
7
|
+
/** Promise that resolves with the luma device when the graph is ready. Await or `.then()` to run after init. */
|
|
8
|
+
readonly deviceInitPromise: Promise<Device>;
|
|
7
9
|
/** Canvas element, assigned asynchronously during device initialization */
|
|
8
10
|
private canvas;
|
|
9
11
|
private attributionDivElement;
|
|
10
12
|
private canvasD3Selection;
|
|
11
13
|
private device;
|
|
12
|
-
private deviceInitPromise;
|
|
13
14
|
/**
|
|
14
15
|
* Tracks whether this Graph instance owns the device and should destroy it on cleanup.
|
|
15
16
|
* Set to `true` when Graph creates its own device, `false` when using an external device.
|