UNPKG

tapspace

Version:

A zoomable user interface lib for web apps

21 lines (19 loc) 527 B
const size3 = require('affineplane').size3 module.exports = function (newBasis) { // @Size:changeBasis(newBasis) // // The basis change of size does not preserve direction except // when the bases have same orientation. Rotation cannot be applied to size. // // Parameters: // newBasis // a BasisComponent // // Return // a Size // const pr = this.basis.getTransitionTo(newBasis) const ps = size3.transitFrom(this.size, pr) const Size = this.constructor return new Size(newBasis, ps) }