Skip to content
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

[BUG]_transformbounds "cannot get properties of null" #356

Open
Kortenbach opened this issue Sep 14, 2022 · 0 comments
Open

[BUG]_transformbounds "cannot get properties of null" #356

Kortenbach opened this issue Sep 14, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@Kortenbach
Copy link

Kortenbach commented Sep 14, 2022

Describe the bug
When running a wick file converted to html in an iframe I get the error:

wickpagina-html:13030 Uncaught TypeError: Cannot read properties of null (reading '_transformBounds')
    at CanvasView.getBounds (wickpagina-html:13030:42)
    at CanvasView.getCenter (wickpagina-html:13086:15)
    at CanvasView.setZoom (wickpagina-html:13101:9)
    at Wick.View.Project._renderSVGCanvas (wickpagina-html:63116:28)
    at Wick.View.Project.render (wickpagina-html:62938:10)
    at Wick.Project.tick (wickpagina-html:51536:15)
    at wickpagina-html:51495:24

To Reproduce
Steps to reproduce the behavior:

  1. I'm embedding the Wick file in an iframe:
 <div class="box" id="htmlgraphics-iframe">
      <iframe src="http://127.0.0.1:1880/wickpagina-html" width="640" height="480"></iframe>
  </div>

  1. Now, the iframe is actually inside of a Grafana panel (can be reproduced using the textpanel and the htmlGraphics panel), but that shouldn't be of much influence.
  2. In some situations (after leaving the htmlGraphics panel editor) the page stops rendering (white page) and the error repeats every tick of the wick engine.

Expected behavior
I expect the page to appear instead of seeing a white screen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows
  • Browser Chrome

Do you have a suggested solution to this issue? (ex. has another program fixed this bug a certain way? Are you familiar with where in the code base someone would need to fix this issue?)
I searched for the error and found that it is inside of PaperJS and has a known work-around. It seems to be related tot zooming:
[https://github.com/paperjs/paper.js/issues/1433]

Additional context
Add any other context about the problem here.

@Kortenbach Kortenbach added the bug Something isn't working label Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant