@cosmograph/cosmos
Advanced tools
Comparing version 1.3.1-beta.0 to 1.3.1-beta.1
@@ -132,3 +132,3 @@ import 'd3-transition'; | ||
*/ | ||
selectNodesByIds(ids?: (string | undefined)[] | null): void; | ||
selectNodesByIds(ids?: (string | undefined)[] | null, focusedNodeId?: string): void; | ||
/** | ||
@@ -138,3 +138,3 @@ * Select multiples nodes by their indices. | ||
*/ | ||
selectNodesByIndices(indices?: (number | undefined)[] | null): void; | ||
selectNodesByIndices(indices?: (number | undefined)[] | null, focusedNodeIndex?: number): void; | ||
/** | ||
@@ -141,0 +141,0 @@ * Unselect all nodes. |
{ | ||
"name": "@cosmograph/cosmos", | ||
"version": "1.3.1-beta.0", | ||
"version": "1.3.1-beta.1", | ||
"description": "GPU-based force graph layout and rendering", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -365,4 +365,4 @@ import { select, Selection } from 'd3-selection' | ||
*/ | ||
public selectNodesByIds (ids?: (string | undefined)[] | null): void { | ||
this.selectNodesByIndices(ids?.map(d => this.graph.getSortedIndexById(d))) | ||
public selectNodesByIds (ids?: (string | undefined)[] | null, focusedNodeId?: string): void { | ||
this.selectNodesByIndices(ids?.map(d => this.graph.getSortedIndexById(d)), this.graph.getSortedIndexById(focusedNodeId)) | ||
} | ||
@@ -374,3 +374,3 @@ | ||
*/ | ||
public selectNodesByIndices (indices?: (number | undefined)[] | null): void { | ||
public selectNodesByIndices (indices?: (number | undefined)[] | null, focusedNodeIndex?: number): void { | ||
if (!indices) { | ||
@@ -386,2 +386,3 @@ this.store.selectedIndices = null | ||
this.points.updateGreyoutStatus() | ||
if (focusedNodeIndex !== undefined) this.store.setFocusedNode(this.graph.getNodeByIndex(focusedNodeIndex), focusedNodeIndex) | ||
} | ||
@@ -388,0 +389,0 @@ |
@@ -233,2 +233,3 @@ import regl from 'regl' | ||
positions: () => this.currentPositionFbo, | ||
particleColor: () => this.colorFbo, | ||
particleSize: () => this.sizeFbo, | ||
@@ -242,2 +243,4 @@ sizeScale: () => config.nodeSizeScale, | ||
maxPointSize: () => store.maxPointSize, | ||
particleGreyoutStatus: () => this.greyoutStatusFbo, | ||
greyoutOpacity: () => config.nodeGreyoutOpacity, | ||
}, | ||
@@ -244,0 +247,0 @@ blend: { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
372648
87
6944