How to use the jointjs.V 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 epam / pipeline-builder / src / visual / Visualizer.js View on Github external
_.forEach(this.selection, (elem) => {
      V(this.paper.findViewByModel(elem).el).toggleClass('selected', false);
    });
    this.selection = [];
github epam / pipeline-builder / src / visual / Paper.js View on Github external
_createCloneNode() {
    const paper = this;
    const viewportTransform = V(paper.viewport).attr('transform');
    V(paper.viewport).attr('transform', '');

    const graph = this.model;
    const viewportBBox = graph.getBBox(graph.getElements());
    const svgClone = paper.svg.cloneNode(true);

    V(paper.viewport).attr('transform', viewportTransform || '');

    V(svgClone).attr('width', '100%');
    V(svgClone).attr('height', '100%');

    V(svgClone).attr('viewBox', `${viewportBBox.x} ${viewportBBox.y} ${viewportBBox.width} ${viewportBBox.height}`);

    return svgClone;
  }
github epam / pipeline-builder / src / visual / Paper.js View on Github external
_createCloneNode() {
    const paper = this;
    const viewportTransform = V(paper.viewport).attr('transform');
    V(paper.viewport).attr('transform', '');

    const graph = this.model;
    const viewportBBox = graph.getBBox(graph.getElements());
    const svgClone = paper.svg.cloneNode(true);

    V(paper.viewport).attr('transform', viewportTransform || '');

    V(svgClone).attr('width', '100%');
    V(svgClone).attr('height', '100%');

    V(svgClone).attr('viewBox', `${viewportBBox.x} ${viewportBBox.y} ${viewportBBox.width} ${viewportBBox.height}`);

    return svgClone;
  }
github epam / pipeline-builder / src / visual / Paper.js View on Github external
_createCloneNode() {
    const paper = this;
    const viewportTransform = V(paper.viewport).attr('transform');
    V(paper.viewport).attr('transform', '');

    const graph = this.model;
    const viewportBBox = graph.getBBox(graph.getElements());
    const svgClone = paper.svg.cloneNode(true);

    V(paper.viewport).attr('transform', viewportTransform || '');

    V(svgClone).attr('width', '100%');
    V(svgClone).attr('height', '100%');

    V(svgClone).attr('viewBox', `${viewportBBox.x} ${viewportBBox.y} ${viewportBBox.width} ${viewportBBox.height}`);

    return svgClone;
  }