-
Notifications
You must be signed in to change notification settings - Fork 1
RS-20085: Only set rhtmlwidget-status to ready once images have loaded #135
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
Changes from all commits
2d226f7
c95641a
567c2c5
27e6551
282f169
fe88542
fcbb378
fa4cf24
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -95,12 +95,15 @@ class RecoloredExternalSvg extends BaseImageType { | |||||||||||||||||||||||||||||||||||||||||||
| return null | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| appendToSvg () { | ||||||||||||||||||||||||||||||||||||||||||||
| appendToSvg (clipId) { | ||||||||||||||||||||||||||||||||||||||||||||
| const cleanedSvgString = this.getRecoloredString() | ||||||||||||||||||||||||||||||||||||||||||||
| const cacheKey = this.getRecoloredStringCacheKey() | ||||||||||||||||||||||||||||||||||||||||||||
| const definitionId = this.definitionManager.addDefinition(cacheKey, cleanedSvgString) | ||||||||||||||||||||||||||||||||||||||||||||
| this.imageHandle = this.d3Node.append('use').attr('xlink:href', `#${definitionId}`) | ||||||||||||||||||||||||||||||||||||||||||||
| return this.imageHandle | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| this.addClipId(clipId) | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| return Promise.resolve() | ||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Used to be There was no such event for this element (so it was never resolved), and waiting for load wasn't needed because we already wait for the svg to download (recolored external svgs) in rhtmlPictographs/theSrc/scripts/imageTypes/recoloredExternalSvg.imagetype.js Lines 11 to 31 in 567c2c5
|
||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| getRecolorArgs () { | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why a TODO was left here if the fix was already mentioned in the comment. Without this change, we wouldn't be waiting for
baseImageCompletePromiseifthis.config.variableImageisnull.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps they mean moving the logic in https://github.com/Displayr/rhtmlPictographs/blob/RS-20085-2/theSrc/scripts/GraphicCell.js#L559-L568 out of the
then, which is what I attempted. It turned out the old logic was necessary (after my changes) in order to get the base image drawn before the variable image.