Skip to content

Comment on Rete: JavaScript framework for visual programming and creating node editorparent

Comments

Looks like editor.toJSON() exports the current graph.

I tried it in the dev consolve, on this page: https://rete.js.org/#/components

The exported object has properties id (string) and nodes (array). Each node is shaped like:

  {
    "id": 1,
    "data": {
      "name": "rete",
      "importance": 1
    },
    "inputs": {
      "pkg": {
        "connections": [
          {
            "node": 2,
            "output": "pkg",
            "data": {
              "pins": []
            }
          }
        ]
      }
    },
    "outputs": {
      "pkg": {
        "connections": [
          {
            "node": 3,
            "input": "pkg",
            "data": {
              "pins": [
                {
                  "x": 306.4013957327592,
                  "y": -1661.933328730452
                }
              ]
            }
          }
        ]
      }
    },
    "position": [
      -509.99078981156725,
      -241.02053426307492
    ],
    "name": "Package"
  }
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.