Duffer Derek

Current Path : /var/www/sitesecurity.bitkit.dk/httpdocs/node_modules/d3-interpolate/src/transform/
Upload File :
Current File : /var/www/sitesecurity.bitkit.dk/httpdocs/node_modules/d3-interpolate/src/transform/parse.js

import decompose, {identity} from "./decompose.js";

var svgNode;

/* eslint-disable no-undef */
export function parseCss(value) {
  const m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + "");
  return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);
}

export function parseSvg(value) {
  if (value == null) return identity;
  if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g");
  svgNode.setAttribute("transform", value);
  if (!(value = svgNode.transform.baseVal.consolidate())) return identity;
  value = value.matrix;
  return decompose(value.a, value.b, value.c, value.d, value.e, value.f);
}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists