mirror of
https://github.com/litruv/lit.ruv.wtf.git
synced 2026-07-24 10:46:03 +10:00
can now add nodes
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
*/
|
||||
export class GraphNode {
|
||||
/**
|
||||
* @param {{ id: string, type: string, title: string, position: {x:number,y:number}, width?: number, inputs: PinDescriptor[], outputs: PinDescriptor[], markdownSrc?: string, imageSrc?: string, lottieSrc?: string, focusOptions?: { paddingFraction?: number, durationMs?: number, minWorldBox?: { width: number, height: number }, responsiveWorldBox?: { minViewportWidth: number, minWorldBox: { width: number, height: number }, anchorX?: number, anchorY?: number } | Array<{ minViewportWidth: number, minWorldBox: { width: number, height: number }, anchorX?: number, anchorY?: number }>, anchorX?: number, anchorY?: number } }} init
|
||||
* @param {{ id: string, type: string, title: string, position: {x:number,y:number}, width?: number, inputs: PinDescriptor[], outputs: PinDescriptor[], markdownSrc?: string, imageSrc?: string, lottieSrc?: string, userSpawned?: boolean, focusOptions?: { paddingFraction?: number, durationMs?: number, minWorldBox?: { width: number, height: number }, responsiveWorldBox?: { minViewportWidth: number, minWorldBox: { width: number, height: number }, anchorX?: number, anchorY?: number } | Array<{ minViewportWidth: number, minWorldBox: { width: number, height: number }, anchorX?: number, anchorY?: number }>, anchorX?: number, anchorY?: number } }} init
|
||||
*/
|
||||
constructor(init) {
|
||||
this.id = init.id;
|
||||
@@ -31,6 +31,8 @@ export class GraphNode {
|
||||
this.imageSrc = init.imageSrc;
|
||||
/** @type {string | undefined} */
|
||||
this.lottieSrc = init.lottieSrc;
|
||||
/** @type {boolean | undefined} */
|
||||
this.userSpawned = init.userSpawned;
|
||||
/** @type {{ paddingFraction?: number, durationMs?: number, minWorldBox?: { width: number, height: number }, anchorX?: number, anchorY?: number } | undefined} */
|
||||
this.focusOptions = init.focusOptions;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user