question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is there any way to get the rendering status ?

See original GitHub issue

Is there any way to get the rendering status such as “rendering completed”?

I want to fetch the canvas content (which is rendered by this API), but currently I can only set the browser to wait for a specific time set by time function.

So I’m wondering if there’s any method to let the fetching program know when the rendering is done?

TIA

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dannyrbcommented, Nov 6, 2018

@sdys888, I think we handle events two different ways. Either:

cornerstone.events.addEventListener('eventname', callbackFn) See: https://github.com/cornerstonejs/cornerstone/blob/master/src/events.js#L54-L67

OR

const element = document.querySelector('#my-element');
element.addEventListener('eventname', callbackFn)`

See: https://github.com/cornerstonejs/cornerstone/blob/master/src/triggerEvent.js

The first allows you to subscribe to events at the “library” level. The second allows you to listen for events for a specific enabledElement.

It looks like ImageRendered is only “emitted” for the enabledElement it is associated with: https://github.com/cornerstonejs/cornerstone/blob/12da9ed267499345ef192d9e5f214cc79122ffc3/src/internal/drawImageSync.js#L78

We actually have an example for this specific event located here: https://github.com/cornerstonejs/cornerstone/blob/12da9ed267499345ef192d9e5f214cc79122ffc3/example/eventhandling/index.html#L76-L112

1reaction
dannyrbcommented, Nov 5, 2018

@sdsy888 this event is emitted when an image is rendered:

There are other helpful events listed in that file. Searching the enumeration should provide examples of listening for events, and use cases that they’re often paired with.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Render Status
Render Status. Get email notifications whenever Render creates, updates or resolves an incident. Email address: By subscribing you agree to our Privacy Policy....
Read more >
Basics of rendering and exporting in After Effects CC
Learn how to render and export in After Effects using the Render Queue panel and Media Encoder and what are the supported output...
Read more >
5 Solutions if After Effects is Not Rendering Properly
The Render Queue panel should appear at the bottom of your After Effects window. Click the blue Best Settings to open the Render...
Read more >
Layouts and Rendering in Rails - Ruby on Rails Guides
From the controller's point of view, there are three ways to create an HTTP ... Note that we don't have explicit render at...
Read more >
Rendering cards inside your application - Adaptive Cards
After you acquire a card payload, simply call the renderer and pass in the card. You will get back a native UI object...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found