Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cosmograph/cosmos

Package Overview
Dependencies
Maintainers
0
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cosmograph/cosmos - npm Package Compare versions

Comparing version 2.0.0-beta.2 to 2.0.0-beta.3

6

dist/config.d.ts

@@ -218,2 +218,7 @@ import { D3ZoomEvent } from 'd3-zoom';

/**
* Cursor style to use when hovering over a point
* Default value: `pointer`
*/
hoveredPointCursor?: string;
/**
* Turns ring rendering around a point on hover on / off

@@ -390,2 +395,3 @@ * Default value: `false`

pointSizeScale: number;
hoveredPointCursor: string;
renderHoveredPointRing: boolean;

@@ -392,0 +398,0 @@ hoveredPointRingColor: string;

2

dist/modules/Points/index.d.ts

@@ -39,3 +39,3 @@ import regl from 'regl';

findHoveredPoint(): void;
trackPointsByIndices(indices: number[]): void;
trackPointsByIndices(indices?: number[] | undefined): void;
getTrackedPositionsMap(): Map<number, [number, number]>;

@@ -42,0 +42,0 @@ getSampledPointPositionsMap(): Map<number, [number, number]>;

@@ -22,2 +22,3 @@ export declare const defaultPointColor = "#b3b3b3";

linkVisibilityMinTransparency: number;
hoveredPointCursor: string;
renderHoveredPointRing: boolean;

@@ -24,0 +25,0 @@ hoveredPointRingColor: string;

{
"name": "@cosmograph/cosmos",
"version": "2.0.0-beta.2",
"version": "2.0.0-beta.3",
"description": "GPU-based force graph layout and rendering",

@@ -5,0 +5,0 @@ "jsdelivr": "dist/index.min.js",

@@ -242,2 +242,8 @@ import { D3ZoomEvent } from 'd3-zoom'

/**
* Cursor style to use when hovering over a point
* Default value: `pointer`
*/
hoveredPointCursor?: string;
/**
* Turns ring rendering around a point on hover on / off

@@ -419,2 +425,3 @@ * Default value: `false`

public pointSizeScale = defaultConfigValues.pointSizeScale
public hoveredPointCursor = defaultConfigValues.hoveredPointCursor
public renderHoveredPointRing = defaultConfigValues.renderHoveredPointRing

@@ -421,0 +428,0 @@ public hoveredPointRingColor = defaultConfigValues.hoveredPointRingColor

@@ -744,2 +744,3 @@ import { select, Selection } from 'd3-selection'

this.initPrograms()
this.points.trackPointsByIndices()
this.store.setFocusedPoint()

@@ -964,5 +965,6 @@ this.store.hoveredPoint = undefined

private updateCanvasCursor (): void {
const { hoveredPointCursor } = this.config
if (this.dragInstance.isActive) select(this.canvas).style('cursor', 'grabbing')
else if (this.store.hoveredPoint) {
if (this.config.disableDrag || this.store.isSpaceKeyPressed) select(this.canvas).style('cursor', 'pointer')
if (this.config.disableDrag || this.store.isSpaceKeyPressed) select(this.canvas).style('cursor', hoveredPointCursor)
else select(this.canvas).style('cursor', 'grab')

@@ -969,0 +971,0 @@ } else select(this.canvas).style('cursor', null)

@@ -439,4 +439,4 @@ import regl from 'regl'

public trackPointsByIndices (indices: number[]): void {
this.trackedIndices = indices
public trackPointsByIndices (indices?: number[] | undefined): void {
if (indices) this.trackedIndices = indices
destroyFramebuffer(this.trackedIndicesFbo)

@@ -446,5 +446,5 @@ this.trackedIndicesFbo = undefined

this.trackedPositionsFbo = undefined
if (indices.length) {
this.trackedIndicesFbo = createTrackedIndicesBuffer(indices, this.store.pointsTextureSize, this.reglInstance)
this.trackedPositionsFbo = createTrackedPositionsBuffer(indices, this.reglInstance)
if (this.trackedIndices?.length) {
this.trackedIndicesFbo = createTrackedIndicesBuffer(this.trackedIndices, this.store.pointsTextureSize, this.reglInstance)
this.trackedPositionsFbo = createTrackedPositionsBuffer(this.trackedIndices, this.reglInstance)
}

@@ -451,0 +451,0 @@ this.trackPoints()

@@ -23,2 +23,3 @@ export const defaultPointColor = '#b3b3b3'

linkVisibilityMinTransparency: 0.25,
hoveredPointCursor: 'auto',
renderHoveredPointRing: false,

@@ -25,0 +26,0 @@ hoveredPointRingColor: 'white',

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 too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc