How to use the flow-view.model function in flow-view

To help you get started, we’ve selected a few flow-view examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fibo / flow-view / test / model / Item.js View on Github external
var test = require('tape')

var Item = require('flow-view').model.Item

test('Model Item', (t) => {
  var item = new Item()

  t.ok(item.id, 'has an id')

  t.end()
})
github fibo / flow-view / test / model / Canvas.js View on Github external
var test = require('tape')

var Canvas = require('flow-view').model.Canvas

test('Model Canvas', (t) => {
  var canvas = new Canvas()

  t.deepEqual(canvas.link, {}, 'link defaults to {}')
  t.deepEqual(canvas.node, {}, 'node defaults to {}')

  t.end()
})
github fibo / flow-view / test / model / Node.js View on Github external
var test = require('tape')

var Node = require('flow-view').model.Node

test('Model Node', (t) => {
  var data = {
    ins: [],
    outs: [],
    text: 'new node',
    x: 10,
    y: 20,
    w: 100,
    h: 10
  }

  var node = new Node(data)

  t.deepEqual(node.getData(), data, 'getData()')

flow-view

is a visual editor for dataflow programming

MIT
Latest version published 2 years ago

Package Health Score

45 / 100
Full package analysis