How to use the jointjs.dia.Paper function in jointjs

To help you get started, we’ve selected a few jointjs 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 ProcessMaker / modeler / src / components / miniMapManager.js View on Github external
static factory(graph, element) {
    const miniMap = new dia.Paper({
      el: element,
      model: graph,
      width: 230,
      height: 200,
      interactive: false,
    });

    return new this(miniMap);
  }
github ProcessMaker / modeler / src / components / paperManager.js View on Github external
static factory(element, interactiveFunc, model) {
    const defaultPadding = 3;
    const paper = new dia.Paper({
      async: true,
      el: element,
      model,
      sorting: 'sorting-approximate',
      gridSize: PaperManager.gridSize,
      drawGrid: true,
      clickThreshold: 10,
      perpendicularLinks: true,
      interactive: interactiveFunc,
      highlighting: {
        default: { options: { padding: defaultPadding } },
      },
    });

    paper.translate(168, 20);