(fromElement, toElement, fromOrigin, toOrigin)
| 118 | }); |
| 119 | }, |
| 120 | _getAlignMatrix = function _getAlignMatrix(fromElement, toElement, fromOrigin, toOrigin) { |
| 121 | var parentMatrix = getGlobalMatrix(fromElement.parentNode, true, true), |
| 122 | m = parentMatrix.clone().multiply(getGlobalMatrix(toElement)), |
| 123 | fromPoint = _originToPoint(fromElement, fromOrigin, parentMatrix), |
| 124 | _originToPoint2 = _originToPoint(toElement, toOrigin, parentMatrix), |
| 125 | x = _originToPoint2.x, |
| 126 | y = _originToPoint2.y, |
| 127 | p; |
| 128 | |
| 129 | m.e = m.f = 0; |
| 130 | |
| 131 | if (toOrigin === "auto" && toElement.getTotalLength && toElement.tagName.toLowerCase() === "path") { |
| 132 | p = toElement.getAttribute("d").match(_numExp) || []; |
| 133 | p = m.apply({ |
| 134 | x: +p[0], |
| 135 | y: +p[1] |
| 136 | }); |
| 137 | x += p.x; |
| 138 | y += p.y; |
| 139 | } //if (p || (toElement.getBBox && fromElement.getBBox && toElement.ownerSVGElement === fromElement.ownerSVGElement)) { |
| 140 | |
| 141 | |
| 142 | if (p) { |
| 143 | p = m.apply(toElement.getBBox()); |
| 144 | x -= p.x; |
| 145 | y -= p.y; |
| 146 | } |
| 147 | |
| 148 | m.e = x - fromPoint.x; |
| 149 | m.f = y - fromPoint.y; |
| 150 | return m; |
| 151 | }, |
| 152 | _align = function _align(rawPath, target, _ref) { |
| 153 | var align = _ref.align, |
| 154 | matrix = _ref.matrix, |
no test coverage detected
searching dependent graphs…