Canvas or viewer loading complete?
Open
Nobody has claimed this yet.
auto-migrated
Priority-Medium
Type-Defect
- Dominant language
- HTML
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Hi.
I want export image of canvas on new tab when replace scene complete. I write
this:
viewer.replaceSceneFromUrl(url);
viewer.onloadingcomplete = function () {
window.open(canvas.toDataURL());
};
It's open blank page. So I solve this:
viewer.replaceSceneFromUrl(url);
viewer.onloadingcomplete = function () {
setTimeout(function(){
window.open(canvas.toDataURL());
},3000)
};
It's ok. But setTimeout is not a good choice. How to identify the view or
canvas is loading complete, please?
Original issue reported on code.google.com by fabien...@gmail.com on 4 Sep 2014 at 8:33
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at viewer.replaceSceneFromUrl and the viewer.onloadingcomplete callback, then trace when the canvas is rendered relative to that callback. Reproduce the window.open(canvas.toDataURL()) example and verify that export works without a fixed delay; the issue names no file or test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100