Skip to content

Add width and height properties for OpenSeadragon 6.0.0 compatibility#9

Merged
jwindhager merged 13 commits into
mainfrom
OSD6.0.2-compatibilty
May 25, 2026
Merged

Add width and height properties for OpenSeadragon 6.0.0 compatibility#9
jwindhager merged 13 commits into
mainfrom
OSD6.0.2-compatibilty

Conversation

@cavenel

@cavenel cavenel commented May 22, 2026

Copy link
Copy Markdown
Contributor

In OpenSeadragon 6, on tilesource ready (https://github.com/openseadragon/openseadragon/blob/767c05aa98985ce1df24f6cc73cda49abd5b047f/src/tilesource.js#L162)
this.dimensions is overwritten by source.width and source.height

In OSD5, there is no ready event handler that overwrites dimensions. The initialization logic (this.dimensions = new $.Point(options.width, options.height)) only runs in the else branch, i.e., when there's no URL and configuration is inline. When a URL is provided, OSD 5 just sets safe defaults and calls getImageInfo, and whatever the subclass sets on this stays untouched.

Simple fix is to add width and height to the OMEZarrTileSource, but would be good to understand why it changed in OSD 6.

Copilot AI review requested due to automatic review settings May 22, 2026 14:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds width and height fields to OMEZarrTileSource so OpenSeadragon 6’s ready-time dimension overwrite logic can read correct image dimensions from the tile source instance.

Changes:

  • Introduce width and height properties on OMEZarrTileSource.
  • Populate width/height during getImageInfo once array shape is known.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/OMEZarrTileSource.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

Comment thread src/OMEZarrTileSource.ts Outdated
Comment thread src/OMEZarrTileSource.ts Outdated
Comment thread .npmrc Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread src/OMEZarrTileSource.ts Outdated
Comment thread src/OMEZarrTileSource.ts
@jwindhager jwindhager force-pushed the OSD6.0.2-compatibilty branch from 21b38fd to ad6e093 Compare May 25, 2026 16:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.

Comment thread src/OMEZarrTileSource.ts
Comment thread package.json
Comment thread package.json Outdated
Comment thread CHANGELOG.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.

Comment thread src/OMEZarrTileSource.ts
Comment thread src/OMEZarrTileSource.ts
Comment thread package.json
Comment thread CHANGELOG.md
@jwindhager jwindhager merged commit 5dd8202 into main May 25, 2026
4 checks passed
@jwindhager jwindhager deleted the OSD6.0.2-compatibilty branch May 25, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants