js/view/ModelViewTransform2.js
/**
   * Creates a shearless ModelViewTransform2 that maps the specified model point to the specified view point, with the given x and y scales.
   *
   * @param modelPoint {Vector2} the reference point in the model which maps to the specified view point
   * @param viewPoint  {Vector2} the reference point in the view
   * @param xScale     {number} the amount to scale in the x direction
   * @param yScale     {number} the amount to scale in the y direction
   * @returns {ModelViewTransform2}
   * @public
   */
Creates a shearless ModelViewTransform2 that maps the specified model point to the specified view point, with the given x and y scales.
Creates a shearless ModelViewTransform2 that maps the specified model point to the specified view point with the given x and y scales .
static createSinglePointXYScaleMapping( modelPoint, viewPoint, xScale, yScale ) {
    const offsetX = viewPoint.x - modelPoint.x * xScale;
    const offsetY = viewPoint.y - modelPoint.y * yScale;
    return ModelViewTransform2.createOffsetXYScaleMapping( new Vector2( offsetX, offsetY ), xScale, yScale );
  }
static createSinglePointXYScaleMapping ( modelPoint , viewPoint , xScale , yScale ) { const offsetX = viewPoint . x - modelPoint . x * xScale ; const offsetY = viewPoint . y - modelPoint . y * yScale ; return ModelViewTransform2 . createOffsetXYScaleMapping ( new Vector2 ( offsetX , offsetY ) , xScale , yScale ) ; }
Creates a shearless ModelViewTransform2 that maps the specified model point to the specified view point, with the given x and y scales.
Creates a shearless ModelViewTransform2 that maps the specified model point to the specified view point with the given x and y scales .
// mx * scale + ox = vx // my * scale + oy = vy