transposeCoordinate(key, coordinate, flipXY) {
    if (typeof coordinate === 'number' && isFinite(coordinate)) {
      const firstChar = key.substring(0, 1);

      if (firstChar === 'x' || key === 'cx') {
        return coordinate * this.width;
      }
      if (key === 'width') {
        return coordinate * this.width;
      }
      if (key === 'r') {
        return coordinate * (!flipXY ? this.width : this.height);
      }
      if (firstChar === 'y' || key === 'cy') {
        return coordinate * this.height;
      }
      if (key === 'height') {
        return coordinate * this.height;
      }
    }

    return coordinate;
  }
/**
   * Transpose a coordinate according to this.flipXY and
   * the available rendering area
   *
   * @param  {String} key        The key of the coordinate to transpose
   * @param  {Number} coordinate The coordinate
   * @return {Number}            The actual location of the coordinate
   */
Transpose a coordinate according to this.flipXY and
the available rendering area

@param  {String} key        The key of the coordinate to transpose
@param  {Number} coordinate The coordinate
@return {Number}            The actual location of the coordinate
Transpose a coordinate according to this . flipXY and the available rendering area @param { String } key The key of the coordinate to transpose @param { Number } coordinate The coordinate @return { Number } The actual location of the coordinate
transposeCoordinate(key, coordinate, flipXY) {
    if (typeof coordinate === 'number' && isFinite(coordinate)) {
      const firstChar = key.substring(0, 1);
      if (firstChar === 'x' || key === 'cx') {
        return coordinate * this.width;
      }
      if (key === 'width') {
        return coordinate * this.width;
      }
      if (key === 'r') {
        return coordinate * (!flipXY ? this.width : this.height);
      }
      if (firstChar === 'y' || key === 'cy') {
        return coordinate * this.height;
      }
      if (key === 'height') {
        return coordinate * this.height;
      }
    }
    return coordinate;
  }
transposeCoordinate ( key , coordinate , flipXY ) { if ( typeof coordinate === 'number' && isFinite ( coordinate ) ) { const firstChar = key . substring ( 0 , 1 ) ; if ( firstChar === 'x' || key === 'cx' ) { return coordinate * this . width ; } if ( key === 'width' ) { return coordinate * this . width ; } if ( key === 'r' ) { return coordinate * ( ! flipXY ? this . width : this . height ) ; } if ( firstChar === 'y' || key === 'cy' ) { return coordinate * this . height ; } if ( key === 'height' ) { return coordinate * this . height ; } } return coordinate ; }
Transpose a coordinate according to this.flipXY and
 the available rendering area
Transpose a coordinate according to this . flipXY and the available rendering area