* Get transform matrix of target (param target), * in coordinate of its ancestor (param ancestor) * * @param target * @param [ancestor]
(target, ancestor)
| 14521 | */ |
| 14522 | |
| 14523 | function getTransform(target, ancestor) { |
| 14524 | var mat = identity([]); |
| 14525 | |
| 14526 | while (target && target !== ancestor) { |
| 14527 | mul$1(mat, target.getLocalTransform(), mat); |
| 14528 | target = target.parent; |
| 14529 | } |
| 14530 | |
| 14531 | return mat; |
| 14532 | } |
| 14533 | /** |
| 14534 | * Apply transform to an vertex. |
| 14535 | * @param target [x, y] |
no test coverage detected
searching dependent graphs…