Noverlap.js 609 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
'use strict';

// https://graphology.github.io/standard-library/layout-noverlap.htlm

import NoverlapLayout from 'graphology-layout-noverlap/worker';

export function _init(graph, options) {
  return new NoverlapLayout(graph, {
    maxIterations: 50000,
    settings: {
      gridSize: 5,
      margin: 500,
      expansion: 2.0,
      ratio: 1.5
    }
  });
}

export function _start(layout) {
  return layout.start();
}

export function _stop(layout) {
  return layout.stop();
}

export function _kill(layout) {
  return layout.kill();
}

export function _isRunning(layout) {
  return layout.isRunning();
}