UNPKG

tapspace

Version:

A zoomable user interface lib for web apps

21 lines (19 loc) 474 B
module.exports = function (basis) { // @TransformerComponent:getDistanceTo(basis) // // Get distance between the transformer anchor to // the anchor of a Component. // If the basis does not have an anchor, default is (0,0). // // Parameters // basis // a Component // // Return // a Distance // if (basis.atAnchor) { return this.atAnchor().getDistanceTo(basis.atAnchor()) } return this.atAnchor().getDistanceTo(basis.at(0, 0)) }