tapspace
Version:
A zoomable user interface lib for web apps
21 lines (19 loc) • 416 B
JavaScript
module.exports = function (source, target) {
// @TransformerComponent:matchPoint(source, target)
//
// Moves the element so that source point position on the element
// matches the target position.
//
// Parameters:
// source
// a Point
// target
// a Point
//
// Return
// this, for chaining
//
const v = source.getVectorTo(target)
this.translateBy(v)
return this
}