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

Solves issue #1318 for transparent TiledImages #1319

Merged
merged 3 commits into from
Oct 6, 2017

Conversation

jetic83
Copy link
Contributor

@jetic83 jetic83 commented Oct 4, 2017

Solves issue #1318 . Transparent TiledImages need to set their _needsDraw to false in their draw function. _updateViewport(), which usually does this, is not called for transparent images. Otherwise, they will trigger world's draw function again and again.

@jetic83 jetic83 changed the title Master Solves issue #1318 for transparent TiledImages Oct 4, 2017
@@ -311,6 +311,10 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
this._updateViewport();
this._midDraw = false;
}
// Images with opacity 0 should not need to be drawn in future. this._needsDraw = false is set in this._updateViewport() for other images.
if (this.opacity === 0) {
Copy link
Member

Choose a reason for hiding this comment

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

Minor point, but let's just make this an else from the if statement above; feels cleaner to me.

@jetic83
Copy link
Contributor Author

jetic83 commented Oct 5, 2017

Thanks, @iangilman , 'else' fixed.

@iangilman
Copy link
Member

Awesome, thank you!

@iangilman iangilman merged commit a0beedc into openseadragon:master Oct 6, 2017
iangilman added a commit that referenced this pull request Oct 6, 2017
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.

2 participants