src/js/animations/ViewTransition-transformOrigin.js
// - otherwise parses this.origin's transform-origin computed style
otherwise parses this.origin's transform-origin computed style
otherwise parses this . origin ' s transform - origin computed style
collapseOriginIntoNewView(start = 0.1, end = 1) {
		this._parseTransformOrigin()
		this.transformOriginXratio = this.transformOriginX / this.originBbox.width
		this.transformOriginYratio = this.transformOriginY / this.originBbox.height
		let {originBbox, newViewBbox} = this
		let diffLeft   = newViewBbox.left   - originBbox.left
		let diffRight  = newViewBbox.right  - originBbox.right
		let diffTop    = newViewBbox.top    - originBbox.top
		let diffBottom = newViewBbox.bottom - originBbox.bottom
		let translateX = (diffLeft * (1 - this.transformOriginXratio)) + (diffRight  * this.transformOriginXratio)
		let translateY = (diffTop  * (1 - this.transformOriginYratio)) + (diffBottom * this.transformOriginYratio)
		this.newViewOriginDiff = {diffLeft, diffRight, diffTop, diffBottom, translateX, translateY}
		this.clipNewViewAroundOrigin(start, end)
		this.moveOriginTowardsNewView(start, end)
	}
collapseOriginIntoNewView ( start = 0.1 , end = 1 ) { this . _parseTransformOrigin ( ) this . transformOriginXratio = this . transformOriginX / this . originBbox . width this . transformOriginYratio = this . transformOriginY / this . originBbox . height let { originBbox , newViewBbox } = this let diffLeft = newViewBbox . left - originBbox . left let diffRight = newViewBbox . right - originBbox . right let diffTop = newViewBbox . top - originBbox . top let diffBottom = newViewBbox . bottom - originBbox . bottom let translateX = ( diffLeft * ( 1 - this . transformOriginXratio ) ) + ( diffRight * this . transformOriginXratio ) let translateY = ( diffTop * ( 1 - this . transformOriginYratio ) ) + ( diffBottom * this . transformOriginYratio ) this . newViewOriginDiff = { diffLeft , diffRight , diffTop , diffBottom , translateX , translateY } this . clipNewViewAroundOrigin ( start , end ) this . moveOriginTowardsNewView ( start , end ) }
otherwise parses this.origin's transform-origin computed style
otherwise parses this . origin ' s transform - origin computed style
// TODO: make these functions separately callable; collapseOriginIntoNewView should be just sugary on top of them, not the only way // todo: add argument or some other way to choose between moving or scaling origin //this.scaleOriginTowardsNewView(start, end)