tapspace
Version:
A zoomable user interface lib for web apps
19 lines (17 loc) • 441 B
JavaScript
const size3 = require('affineplane').size3
module.exports = function (newBasis) {
// @Size:transitRaw(newBasis)
//
// Represent the size in another basis.
// Unlike changeBasis, returns a plain object without basis data.
//
// Parameters:
// newBasis
// a BasisComponent
//
// Return
// a size3, an object.
//
const tran = this.basis.getTransitionTo(newBasis)
return size3.transitFrom(this.size, tran)
}