@neo4j-nvl/base 0.3.8-b2d98821 → 0.3.8-befb8ea1
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.
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
9
9
|
|
|
10
|
-
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/
|
|
10
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
11
11
|
|
|
12
12
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
13
13
|
|
package/dist/types/index.d.ts
CHANGED
|
@@ -267,10 +267,13 @@ declare class NVL {
|
|
|
267
267
|
* @param {string} options.backgroundColor - The background color of the png file.
|
|
268
268
|
* The size of the png file will be the size of the canvas in the DOM.
|
|
269
269
|
*/
|
|
270
|
-
saveToFile(options
|
|
270
|
+
saveToFile(options?: {
|
|
271
271
|
filename?: string;
|
|
272
272
|
backgroundColor?: string;
|
|
273
273
|
}): void;
|
|
274
|
+
getImageDataUrl(options?: {
|
|
275
|
+
backgroundColor?: string;
|
|
276
|
+
}): string;
|
|
274
277
|
/**
|
|
275
278
|
* Saves the entire graph visualization canvas as a png to the client.
|
|
276
279
|
* @param {{ filename: string, backgroundColor: string }} options The filename and background color of the png.
|
|
@@ -279,7 +282,7 @@ declare class NVL {
|
|
|
279
282
|
* The size of the png file will be as large as the entire graph at the default zoom level.
|
|
280
283
|
* Can result in a very large file.
|
|
281
284
|
*/
|
|
282
|
-
saveFullGraphToLargeFile(options
|
|
285
|
+
saveFullGraphToLargeFile(options?: {
|
|
283
286
|
filename?: string;
|
|
284
287
|
backgroundColor?: string;
|
|
285
288
|
}): void;
|
|
@@ -109,9 +109,13 @@ export default class NvlController {
|
|
|
109
109
|
private getLayout;
|
|
110
110
|
setLayout(layoutType: Layout): void;
|
|
111
111
|
setLayoutOptions(options: LayoutOptions): void;
|
|
112
|
-
|
|
112
|
+
private getDataUrlForCanvas;
|
|
113
|
+
private initiateFileDownload;
|
|
114
|
+
private updateLayoutAndPositions;
|
|
113
115
|
saveToFile(options: SaveToFileOptions): void;
|
|
114
|
-
|
|
116
|
+
getImageDataURL(options: SaveToFileOptions): string;
|
|
117
|
+
private prepareLargeFileForDownload;
|
|
118
|
+
private createCanvasAndRenderImage;
|
|
115
119
|
saveFullGraphToLargeFile(options: SaveToFileOptions): Promise<void>;
|
|
116
120
|
}
|
|
117
121
|
export {};
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* @param canvas The canvas to fix the size of.
|
|
4
4
|
*
|
|
5
5
|
* Make sure canvas pixel buffer is 1 to 1 vs screen pixels
|
|
6
|
+
*
|
|
7
|
+
* @note If the parent element is not connected to the DOM, it will use the width and height from the style properties.
|
|
6
8
|
*/
|
|
7
9
|
export declare const fitCanvasSizeToParent: (canvas: HTMLCanvasElement) => void;
|
|
8
10
|
export declare const addWebGLContextLostListener: (canvas: HTMLCanvasElement, contextLostCallback?: (e: WebGLContextEvent) => void) => void;
|
|
@@ -11,6 +11,7 @@ export declare const DefaultNodeSize = 25;
|
|
|
11
11
|
export declare const DefaultNodeColor = "#FFDF81";
|
|
12
12
|
export declare const DefaultRelColor = "#818790";
|
|
13
13
|
export declare const DefaultRelWidth = 1;
|
|
14
|
+
export declare const MaxFlatRelWidth = 20;
|
|
14
15
|
export declare const DisabledItemColor = "#EDEDED";
|
|
15
16
|
export declare const DisabledItemFontColor = "#DDDDDD";
|
|
16
17
|
export declare const DefaultShadowColor = "#CFD1D4";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neo4j-nvl/base",
|
|
3
|
-
"version": "0.3.8-
|
|
3
|
+
"version": "0.3.8-befb8ea1",
|
|
4
4
|
"license": "SEE LICENSE IN 'LICENSE.txt'",
|
|
5
5
|
"homepage": "https://neo4j.com/docs/nvl/current/",
|
|
6
6
|
"description": "Base library for the Neo4j Visualization Library",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"postpack": "rm LICENSE.txt && rm CHANGELOG.md"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@neo4j-nvl/layout-workers": "0.3.8-
|
|
32
|
+
"@neo4j-nvl/layout-workers": "0.3.8-befb8ea1",
|
|
33
33
|
"@segment/analytics-next": "^1.70.0",
|
|
34
34
|
"color-string": "^1.9.1",
|
|
35
35
|
"d3-force": "^3.0.0",
|