Library for calculating where to draw tree nodes, while avoiding overlap.

Overview

Tree Grapher

Library for calculating where to draw tree nodes, while avoiding overlap.

Installation

  • 1) npm install tree-grapher --save-exact

The --save-exact flag is recommended (to disable version-extending), since this package uses Explicit Versioning (Release.Breaking.FeatureOrFix) rather than SemVer (Breaking.Feature.Fix).

For FeatureOrFix version-extending (recommended for libraries), prepend "~" in package.json. (for Breaking, prepend "^")

Examples

  • 1) Clone/download repo to disk.
  • 2) Run: npm install
  • 3) Run: npm run examples-dev
  • 4) Navigate to localhost:8080 in your browser.

Design

Wave system (change/update propagation)

  • Change-propagation is split into two phases: the "down wave" and "up wave".
  • During each wave, cross-node-group propagation occurs not by calling functions, but rather by adding a "message" to the wave, with the message containing a "for" field to say who should receive it. (if applicable)
  • During the up-wave, propagation can occur "sideways", through the tree-column system; but in this case, it's still easier to follow, because those "sideway" propagations occur in a new "down wave" starting at those sideways matches, and these waves occur after the current up-wave has fully completed.
  • Each "wave" contains a full list of "messages" that were sent by the node-groups, so that's the most convenient place to "debug" / probe for flaws.
  • This abstraction isn't "algorithmically necessary", but I think it will help the debugging process substantially.

Tasks

Short term:

  • n/a

Long term:

  • Add system that uses dynamic x-ranges for the columns, based on the encountered node-group rects. This enables the system to avoid spurious "collisions", creating more compact graphs, while not giving up (most of) the "easier to reason about" qualities of distinct column entries. (the column entries are at dynamic positions/sizes, but the visualizer makes these rects clear, so still keeps the reasoning/debugging process straightforward)
  • Fix glitch where if a node-ui-inner shrinks horizontally such that it also changes the height (due to browser layout system), it can cause the connector-lines to target the wrong (diff from border is -X rather than +X) positions. You can see this in the demo, by enabling x3 on the "0.0" node, then increasing its width, then decreasing its width. [not terribly high priority, since such resizing is expected to be rare in actual programs]
You might also like...

An easy-to-use JavaScript library aimed at making it easier to draw on SVG elements.

svg-pen-sketch An easy-to-use JavaScript library aimed at making it easier to draw on SVG elements when using a digital pen (such as the Surface Pen).

Jul 27, 2022

DrawPage - Draw page using HTML, CSS and JS

HEAD DrawPage Draw page with HTML, CSS e JS Fala galera, mais um projeto

Feb 9, 2022

A chrome / firefox extension to draw on any webpage with tldraw

A chrome / firefox extension to draw on any webpage with tldraw

tldrawe A chrome / firefox extension to draw on any webpage with tldraw. Development From the root folder: Run yarn to install dependencies. Run yarn

Jan 6, 2023

Supercharge Notion with custom commands to record, draw, and more ✍️

Supercharge Notion with custom commands to record, draw, and more ✍️

Slashy Supercharge Notion with custom commands to record, draw, and more ✨ Slashy is an open source extension that lets you create custom commands for

Dec 28, 2022

This tool allows you to draw up plans for facilities from Foxhole's new Inferno update. It takes power and resource needs into account to help you efficiently design your facilities.

This tool allows you to draw up plans for facilities from Foxhole's new Inferno update. It takes power and resource needs into account to help you efficiently design your facilities.

Foxhole Facility Planner This tool allows you to draw up plans for facilities from Foxhole's new Inferno update. It takes power and resource needs int

Dec 23, 2022

A refined tool for exploring open-source projects on GitHub with a file tree, rich Markdown and image previews, multi-pane multi-tab layouts and first-class support for Ink syntax highlighting.

A refined tool for exploring open-source projects on GitHub with a file tree, rich Markdown and image previews, multi-pane multi-tab layouts and first-class support for Ink syntax highlighting.

Ink codebase browser, "Kin" 🔍 The Ink codebase browser is a tool to explore open-source code on GitHub, especially my side projects written in the In

Oct 30, 2022

JqTree - Tree widget for jQuery

JqTree - Tree widget for jQuery

jqTree JqTree is a tree widget. Read more in the documentation. Features Create a tree from JSON data Drag and drop Works on ie9+, firefox, chrome and

Dec 22, 2022

javascript implementation of logistic regression/c4.5 decision tree

LearningJS: A Javascript Implementation of Logistic Regression and C4.5 Decision Tree Algorithms Author: Yandong Liu. Email: yandongl @ cs.cmu.edu Upd

Aug 19, 2022

NodeJS Implementation of Decision Tree using ID3 Algorithm

Decision Tree for Node.js This Node.js module implements a Decision Tree using the ID3 Algorithm Installation npm install decision-tree Usage Import

Dec 12, 2022
Owner
Stephen Wicklund
Stephen Wicklund
Calculating Pi number without limitation until 10k digits or more in your browser powered by JS without any third party library!

PI Calculator Web JS (Online) Calculating Pi number without limitation until 10k digits or more in your browser powered by JS without any third party

Max Base 6 Jul 27, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Fancytree - JavaScript tree view / tree grid plugin with support for keyboard, inline editing, filtering, checkboxes, drag'n'drop, and lazy loading

Fancytree Fancytree (sequel of DynaTree 1.x) is a JavaScript tree view / tree grid plugin with support for keyboard, inline editing, filtering, checkb

Martin Wendt 2.6k Jan 9, 2023
A small application that uses your sats to transmit data to other nodes.

satoshi-read-write Send data to other nodes in the Lightning Network. This project mainly serves as a demonstration to the DataSig and DataStruct spec

George Tsagkarelis 9 Nov 3, 2022
Garfield Whatsapp 🐼 Userbot is a button 🦋 bot that operates 24×7 Hour powered By X-nodes server

GARFIELD WHATSAPP USER BOT LATEST VERSION (Button Update ?? And 24×7 hour Working ?? ) New Features and upgrades v8.0 ?? ?? Bot continues to work even

NOIZ Ξ 33 Dec 4, 2022
[WIP] n8n nodes that cover the Zoho "Books" API

n8n-nodes-starter This repo contains example nodes to help you get started building your own custom integrations for n8n. It includes the node linter

Vrishin Patel 6 Nov 26, 2022
The bot used for the official Huguitis Nodes server. Simply an entertainment bot.

HuguitisNodesBot The bot used for the official Huguitis Nodes server. Simply an entertainment bot. You can use the bot but remember to follow the lice

Huguitis Nodes 7 Nov 19, 2022
A simple library to draw option menu or other popup inputs and layout on Node.js console.

console-gui-tools A simple library to draw option menu or other popup inputs and layout on Node.js console. console-gui-tools A simple Node.js library

Elia Lazzari 12 Dec 24, 2022