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.

Allow multiple whiskers

See original GitHub issue

I wanted to experiment with multiple whiskers but creating the second whisker failed with the error:

Error[program:0:0]: "Cannot read property 'getContext' of null"

The problem seems to be that paper.get('supporterCanvas') only returns a reference to the canvas on the first call. I assume the reason for this is that you can call transferControlToOffscreen only once. Instead of just returning null I think it would be nicer if paper.get(‘supporterCanvas’) would cache the reference to the canvas on the worker side and return the cached reference instead. I think this would be generally useful independent of the whisker issue. To improve handling multiple whiskers I would like to change the current implementation so only a single setInterval is created by paper.whenPointsAt().

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
paulsonnentagcommented, Apr 30, 2018

No this is a separate issue. The problem is the following line, where the whisker canvas is requested:

https://github.com/janpaul123/paperprograms/blob/a35abb97008d711c29e5092c9b99117529c02037/client/paper/entry.js#L125

If this is called twice the second time null is returned instead of a reference to the canvas. I quick fix would be to generate a unique id for each whisker canvas.

0reactions
janpaul123commented, May 4, 2018

Ah that’s a good idea! Maybe we should drop the two different colours in the default case too and just use the moving dot animation? In any case, sounds good to me. 💯

Read more comments on GitHub >

github_iconTop Results From Across the Web

Several Boxplots per Category, Whiskers & Boxplot do not align
However, I have several issues: I want the whiskers to have small horizontal lines. I tried to do it by stat_boxplot(geom = "errorbar")...
Read more >
A Complete Guide to Box Plots | Tutorial by Chartio
Whisker range and outliers ... There are multiple ways of defining the maximum length of the whiskers extending from the ends of the...
Read more >
How often should cats' whiskers be trimmed? - Vet Help Direct
The short answer, never. Cats whiskers are important for their communication, balance and protection, find out more in our latest blog.
Read more >
Understanding and using Box and Whisker Plots - Tableau
As shown above, one can arrange several box and whisker plots horizontally or vertically to allow for easy comparison. When and how to...
Read more >
Cats, husbands and whiskers - Dayton.com
It's known that whiskers also help felines hunt. Pip's whiskers allow him to sense his prey or even to alert him to predators....
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