@cosmos.gl/graph 3.0.0-beta.0 → 3.0.0-beta.2
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/{src/config.d.ts → config.d.ts} +34 -0
- package/dist/{index-erwqpfu-.js → index-C5QFXagg.js} +1966 -1931
- package/dist/index-C5QFXagg.js.map +1 -0
- package/dist/{src/index.d.ts → index.d.ts} +14 -4
- package/dist/index.js +1 -1
- package/dist/index.min.js +58 -58
- package/dist/index.min.js.map +1 -1
- package/dist/{src/modules → modules}/Store/index.d.ts +1 -1
- package/dist/{src/modules → modules}/Zoom/index.d.ts +6 -5
- package/dist/{webgl-device-zHpMG57Z.js → webgl-device-Dfa4MRJu.js} +2 -2
- package/dist/{webgl-device-zHpMG57Z.js.map → webgl-device-Dfa4MRJu.js.map} +1 -1
- package/package.json +5 -14
- package/dist/index-erwqpfu-.js.map +0 -1
- package/dist/vite.config.d.ts +0 -2
- /package/dist/{src/graph → graph}/utils/error-message.d.ts +0 -0
- /package/dist/{src/helper.d.ts → helper.d.ts} +0 -0
- /package/dist/{src/modules → modules}/Clusters/index.d.ts +0 -0
- /package/dist/{src/modules → modules}/Drag/index.d.ts +0 -0
- /package/dist/{src/modules → modules}/FPSMonitor/css.d.ts +0 -0
- /package/dist/{src/modules → modules}/FPSMonitor/index.d.ts +0 -0
- /package/dist/{src/modules → modules}/ForceCenter/index.d.ts +0 -0
- /package/dist/{src/modules → modules}/ForceGravity/index.d.ts +0 -0
- /package/dist/{src/modules → modules}/ForceLink/force-spring.d.ts +0 -0
- /package/dist/{src/modules → modules}/ForceLink/index.d.ts +0 -0
- /package/dist/{src/modules → modules}/ForceManyBody/index.d.ts +0 -0
- /package/dist/{src/modules → modules}/ForceMouse/index.d.ts +0 -0
- /package/dist/{src/modules → modules}/GraphData/index.d.ts +0 -0
- /package/dist/{src/modules → modules}/Lines/geometry.d.ts +0 -0
- /package/dist/{src/modules → modules}/Lines/index.d.ts +0 -0
- /package/dist/{src/modules → modules}/Points/atlas-utils.d.ts +0 -0
- /package/dist/{src/modules → modules}/Points/index.d.ts +0 -0
- /package/dist/{src/modules → modules}/Shared/buffer.d.ts +0 -0
- /package/dist/{src/modules → modules}/Shared/texture-utils.d.ts +0 -0
- /package/dist/{src/modules → modules}/Shared/uniform-utils.d.ts +0 -0
- /package/dist/{src/modules → modules}/core-module.d.ts +0 -0
- /package/dist/{src/variables.d.ts → variables.d.ts} +0 -0
|
@@ -332,16 +332,27 @@ export declare class Graph {
|
|
|
332
332
|
fitView(duration?: number, padding?: number): void;
|
|
333
333
|
/**
|
|
334
334
|
* Center and zoom in/out the view to fit points by their indices in the scene.
|
|
335
|
+
* @param indices Point indices to fit in the view.
|
|
335
336
|
* @param duration Duration of the center and zoom in/out animation in milliseconds (`250` by default).
|
|
336
|
-
* @param padding Padding around the viewport in percentage
|
|
337
|
+
* @param padding Padding around the viewport in percentage (`0.1` by default).
|
|
337
338
|
*/
|
|
338
339
|
fitViewByPointIndices(indices: number[], duration?: number, padding?: number): void;
|
|
339
340
|
/**
|
|
340
341
|
* Center and zoom in/out the view to fit points by their positions in the scene.
|
|
342
|
+
* @param positions Flat array of point coordinates as `[x0, y0, x1, y1, ...]`.
|
|
341
343
|
* @param duration Duration of the center and zoom in/out animation in milliseconds (`250` by default).
|
|
342
|
-
* @param padding Padding around the viewport in percentage
|
|
344
|
+
* @param padding Padding around the viewport in percentage (`0.1` by default).
|
|
343
345
|
*/
|
|
344
346
|
fitViewByPointPositions(positions: number[], duration?: number, padding?: number): void;
|
|
347
|
+
/**
|
|
348
|
+
* Sets the zoom transform so that the given point positions fit in the viewport, with optional animation.
|
|
349
|
+
*
|
|
350
|
+
* @param positions Flat array of point coordinates as `[x0, y0, x1, y1, ...]`.
|
|
351
|
+
* @param duration Animation duration in milliseconds. Default `250`.
|
|
352
|
+
* @param scale Optional scale factor; if omitted, scale is chosen to fit the positions.
|
|
353
|
+
* @param padding Padding around the viewport as a fraction (e.g. `0.1` = 10%). Default `0.1`.
|
|
354
|
+
*/
|
|
355
|
+
setZoomTransformByPointPositions(positions: Float32Array, duration?: number, scale?: number, padding?: number): void;
|
|
345
356
|
/**
|
|
346
357
|
* Get points indices inside a rectangular area.
|
|
347
358
|
* @param selection - Array of two corner points `[[left, top], [right, bottom]]`.
|
|
@@ -595,9 +606,8 @@ export declare class Graph {
|
|
|
595
606
|
private onClick;
|
|
596
607
|
private updateMousePosition;
|
|
597
608
|
private onMouseMove;
|
|
598
|
-
private
|
|
609
|
+
private onContextMenu;
|
|
599
610
|
private resizeCanvas;
|
|
600
|
-
private setZoomTransformByPointPositions;
|
|
601
611
|
private updateZoomDragBehaviors;
|
|
602
612
|
private findHoveredItem;
|
|
603
613
|
private findHoveredPoint;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as i, P as e, C as t, A as r, x as n, v as o, r as l, q as b, E as c, s as g, w as P, z as m, y as p, F as x } from "./index-
|
|
1
|
+
import { G as i, P as e, C as t, A as r, x as n, v as o, r as l, q as b, E as c, s as g, w as P, z as m, y as p, F as x } from "./index-C5QFXagg.js";
|
|
2
2
|
export {
|
|
3
3
|
i as Graph,
|
|
4
4
|
e as PointShape,
|