Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow silencing multi-image warnings #2120

Conversation

claycoleman
Copy link
Contributor

In our application, we're overlaying multiple images on top of one another with the same dimensions. As a result, the multi-image warnings do not apply to us, and we'd like a way to silence these console.error calls so our Chrome devtools aren't filled with errors.

To implement this, I added a new option to openseadragon.js and viewport.js called silenceMultiImageWarnings, and then updated each warning callsite to first check that flag.

@claycoleman
Copy link
Contributor Author

cc @iangilman and @msalsbery  since I can't change the reviewers manually!

Copy link
Member

@iangilman iangilman left a comment

Choose a reason for hiding this comment

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

I appreciate this patch, though I'm a little ambivalent about it: You don't really need it for your scenario... You can just call those functions on viewer.world.getItemAt(0) instead of on viewer.viewport. That said, if this works better for you, it's not harming the API, since it's an explicit flag. So, let's do it :)

@iangilman iangilman merged commit d175de1 into openseadragon:master Mar 4, 2022
iangilman added a commit that referenced this pull request Mar 4, 2022
@claycoleman claycoleman deleted the allow-silencing-multi-image-warnings branch May 16, 2022 16:10
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.

None yet

2 participants