How to use the jointjs.V.createSVGTransform 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
V.prototype.transform = function fun(matrix, opt) {
  const node = this.node;

  if (V.isUndefined(matrix)) {
    return (node.parentNode)
      ? this.getTransformToElement(node.parentNode)
      : node.getScreenCTM();
  }

  if (opt && opt.absolute) {
    return this.attr('transform', V.matrixToTransformString(matrix));
  }

  const svgTransform = V.createSVGTransform(matrix);
  node.transform.baseVal.appendItem(svgTransform);
  return this;
};