code: function getTranslation(viewport) {
    let x;
    let y;
  
    // Modulus 360 on the rotation so that we only
    // have to worry about four possible values.
    switch(viewport.rotation % 360) {
      case 0:
        x = y = 0;
        break;
      case 90:
        x = 0;
        y = (viewport.width / viewport.scale) * -1;
        break;
      case 180:
        x = (viewport.width / viewport.scale) * -1;
        y = (viewport.height / viewport.scale) * -1;
        break;
      case 270:
        x = (viewport.height / viewport.scale) * -1;
        y = 0;
        break;
    }
  
    return { x, y };
  }
docs: Get the x/y translation to be used for transforming the annotations
  based on the rotation of the viewport.
  
  @param {Object} viewport The viewport data from the page
  @return {Object}