Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cosmos.gl/graph",
"version": "2.6.2",
"version": "2.6.4",
"description": "GPU-based force graph layout and rendering",
"jsdelivr": "dist/index.min.js",
"main": "dist/index.js",
Expand All @@ -19,7 +19,8 @@
"lint": "eslint --cache ./src --ext .ts --ignore-path .gitignore",
"lint:staged": "npx lint-staged",
"storybook": "storybook dev -p 6006",
"build:storybook": "storybook build"
"build:storybook": "storybook build",
"prepublishOnly": "npm run build:vite"
},
"engines": {
"node": ">=12.2.0",
Expand Down
11 changes: 10 additions & 1 deletion src/modules/Lines/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,16 @@ export class Lines extends CoreModule {

public findHoveredLine (): void {
if (!this.data.linksNumber || !this.store.isLinkHoveringEnabled) return
if (!this.linkIndexFbo) this.updateLinkIndexFbo()

// Ensure all required buffers are initialized before hover detection
if (!this.pointsBuffer) return
if (!this.linkIndexFbo) return
if (!this.linkIndexBuffer) return
if (!this.colorBuffer) return
if (!this.widthBuffer) return
if (!this.arrowBuffer) return
if (!this.curveLineGeometry || !this.curveLineBuffer) return

this.reglInstance.clear({
framebuffer: this.linkIndexFbo as regl.Framebuffer2D,
color: [0, 0, 0, 0],
Expand Down