Socket
Socket
Sign inDemoInstall

nodelayout

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodelayout

For node Layout.


Version published
Maintainers
1
Created
Source

nodeLayout

Demo

For Graph Layout or Edit.

How to use

yarn add nodelayout

OR

npm install nodelayout

Demo

yarn start

Init

import * as nodelayout from "nodelayout";
nodelayout.init({
      id: "node-wrap",
      connectType: "line", // path or line
      nodeType: "rect", // rect or circle
      onNodeClick: function (d) {
        console.log(d);
      },
      onPathClick: function (d) {
        console.log(d);
      },
      list: [{
        title: "step1",
        id: "0"
      }, {
        title: "step2",
        id: "1"
      }, {
        title: "step3",
        id: "2"
      }, {
        title: "step4",
        id: "3"
      }, {
        title: "step5",
        id: "4"
      }, {
        title: "step6",
        id: "5"
      }, {
        title: "step7",
        id: "6"
      }],
      nodes: [{
        title: "step8",
        id: "0",
        x: 100,
        y: 200
      }, {
        title: "step9",
        id: "1"
      }],
      lines: [{
        source: "0",
        target: "1",
        startIndex: 0, //0, 1, 2, 3
        endIndex: 3
      }]
    })

Add

nodelayout.add({
  title: 'step',
  id: Math.random() + ''
});

FAQs

Package last updated on 24 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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