code: function(imageX, imageY) {
          if (imageX instanceof $.Point) {
              //they passed a point instead of individual components
              return this.imageToViewportCoordinates(imageX.x, imageX.y);
          }
  
          if (this.viewer) {
              var count = this.viewer.world.getItemCount();
              if (count > 1) {
                  $.console.error('[Viewport.imageToViewportCoordinates] is not accurate ' +
                      'with multi-image; use TiledImage.imageToViewportCoordinates instead.');
              } else if (count === 1) {
                  // It is better to use TiledImage.viewportToImageCoordinates
                  // because this._contentBoundsNoRotate can not be relied on
                  // with clipping.
                  var item = this.viewer.world.getItemAt(0);
                  return item.imageToViewportCoordinates(imageX, imageY, true);
              }
          }
  
          var point = this._imageToViewportDelta(imageX, imageY);
          point.x += this._contentBoundsNoRotate.x;
          point.y += this._contentBoundsNoRotate.y;
          return point;
      }
docs: Translates from image coordinate system to OpenSeadragon viewer coordinate system
  This method can be called either by passing X,Y coordinates or an
  OpenSeadragon.Point
  Note: not accurate with multi-image; use TiledImage.imageToViewportCoordinates instead.
  @function
  @param {(OpenSeadragon.Point | Number)} imageX the point or the
  X coordinate in image coordinate system.
  @param {Number} [imageY] Y coordinate in image coordinate system.
  @return {OpenSeadragon.Point} a point representing the coordinates in the viewport.