These are chat archives for openseadragon/openseadragon

Dec 2016
Patrick Liechty
Dec 01 2016 03:10
@iangilman Ok, so I am trying to track down in our app an issue first. When I set the rect for the overlay with viewport coordinates, it sizes the overlay with web coorinates because the overlay is tiny. In the codepen, if I use the same rect, it is using viewport coordinates. Is there a config setting that says to use web?
THis is our config:
var openSDDefaultConfig = {
  id: $el.get(0).id,
  prefixUrl: '',
  autoHideControls: false,
  showNavigationControl: false, // Turns on/off the default image toolbar
  showNavigator: false,         // Turns on/off the viewport navigator control
  showZoomControl: false,
  showHomeControl: false,
  showFullPageControl: false,
  showSequenceControl: false,
  preserveViewport: true,
  navigatorPosition: "BOTTOM_LEFT",
  navigatorHeight: 100,
  navigatorWidth: 120,
  navigatorAutoResize: false,
  crossOriginPolicy: crossOriginPolicy,
  zoomPerClick: 1.5,
  zoomPerScroll: 1.05,
  gestureSettingsMouse: {clickToZoom: false, dblClickToZoom: true},
  gestureSettingsTouch: {dblClickToZoom: false},
  preserveImageSizeOnResize: true,
  imageLoaderLimit: 10,          // Restrict the max image requests to prevent tile load timeout errors
  collectionMode: true,
  collectionColumns: 10,          // Default to 10 images wide
  collectionRows: 0,              // Add rows as needed
  collectionLayout: "horizontal", // Read left-to-right, top-to-bottom, like a book in English
  collectionTileSize: 1024,
  collectionTileMargin: 256,
  autoResize: false
Ian Gilman
Dec 01 2016 19:27
@patrickliechty It's always using viewport coordinates, but the relationship between the image and the overlay size depend on how you size the image. In the codepen, since you're not explicitly sizing the image it gets a width of 1. In your app, the collectionTileSize of 1024 means your images are going to be 1024 wide (or 1024 tall if it's a portrait orientation image). Of course in the former case, an overlay that covers half of the image would have to be 0.5 wide whereas in the latter, an overlay that covers half the image would have to be 512 wide.