Skip to content

Commit

Permalink
fix node picking
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean McBeth committed Jan 19, 2024
1 parent ff048d7 commit 5f11888
Show file tree
Hide file tree
Showing 10 changed files with 114 additions and 89 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export declare class ForceDirectedGraph<T> {
private displayCount;
private selectedNode;
private data;
private grabbed;
private timer;
performLayout: boolean;
displayDepth: number;
Expand Down

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

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

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { GraphNode } from "@juniper-lib/collections/dist/GraphNode";
import { Vec2 } from "gl-matrix/dist/esm";
export declare class ForceDirectedNode<T> extends GraphNode<T> {
#private;
private readonly content;
readonly pinner: HTMLButtonElement;
readonly element: HTMLElement;
Expand All @@ -9,23 +10,23 @@ export declare class ForceDirectedNode<T> extends GraphNode<T> {
readonly size: Vec2;
readonly halfSize: Vec2;
readonly dynamicForce: Vec2;
private _pinned;
depth: number;
hidden: boolean;
get pinned(): boolean;
set pinned(v: boolean);
get grabbed(): boolean;
set grabbed(v: boolean);
get moving(): boolean;
set moving(v: boolean);
constructor(value: T, elementClass: string, content: string | HTMLElement);
setContent(content: string | HTMLElement): void;
setMouseOffset(mousePoint: Vec2): void;
computeBounds(sz: number): void;
applyForces(nodes: Iterable<ForceDirectedNode<T>>, running: boolean, performLayout: boolean, displayDepth: number, centeringGravity: number, mousePoint: Vec2, attract: number, repel: number, attractFunc: (connected: boolean, len: number) => number, repelFunc: (connected: boolean, len: number) => number, getWeightMod: (connected: boolean, dist: number, a: T, b: T) => number): void;
updatePosition(center: Vec2, maxDepth: number): void;
moveTo(mousePoint: Vec2): void;
resetForce(): void;
private isVisible;
canDrawArrow(maxDepth: number): boolean;
gravitate(gravity: number): void;
attractRepel(n2: ForceDirectedNode<T>, attract: number, attractFunc: (connected: boolean, len: number) => number, repel: number, repelFunc: (connected: boolean, len: number) => number, getWeightMod: (connected: boolean, dist: number, a: T, b: T) => number): void;
apply(t: number): void;
}
Expand Down

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

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

Loading

0 comments on commit 5f11888

Please sign in to comment.