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.

No way to tell if drawLayers has finished

See original GitHub issue

Would you accept a PR that adds another function, i.e. willDrawLayers (or some other name) that returns a promise to draw the layers? Right now there is no way to tell if this function has finished, which has resulted in an issue for me. Otherwise, does drawLayers currently support callbacks? Let me know if you need further information describing my situation.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
caleb531commented, Mar 15, 2017

Nah, it’s still related. 😃

jCanvas stores its data for each canvas element as jQuery data (set using $.data). I believe jQuery’s clone() method will copy this data if you specify the appropriate arguments (see the withDataAndEvents and deepWithDataAndEvents parameters in the aforementioned method docs).

1reaction
caleb531commented, Mar 12, 2017

Alright, I’ve made a few tweaks to add support for a complete callback to drawLayers, which runs when all layers have finished drawing.

Here’s the basic usage:

$myCanvas.drawLayers({
  complete: function() {
    // code here runs when all layers have finished drawing
  }
});

You can download the updated jCanvas build below. @r0fls, please try it and let me know if it solves your particular issue. 😃

jcanvas.js.zip

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I know when a CATiledLayer has rendered all visible ...
Threads have a isFinished bool that you can key-value observe to discover when a tiled layer has completed its render. If you're not...
Read more >
Support | jCanvas
Contact Me. If you have any questions regarding jCanvas or have a bug report to submit, please first check the Documentation or the...
Read more >
Draw layers with representations—ArcGIS Pro | Documentation
If the layer has multiple representations, there is a symbology option for each one. To make modifications to the layer's symbology, convert the...
Read more >
Leaflet draw layers disappearing after creation in Django
When you finish drawing of feature/geometry, item is not automatically added to the feature layer, you have to add it through L.Draw.Event.
Read more >
C++ Game Dev 21: Draw Layers and Dynamic Sort
This will help simplify how we sort and layer our sprites. ... We now retrieve the drawables layer and check if our map...
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