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.

How to fire event after `v-stage` rerenders

See original GitHub issue

I have a stage that I’m dynamically generating from a VueX model, as is recommended in the docs.

The problem is that when I update the model from outside the canvas (e.g. an input of a shape’s x value for example), any watchers of the model fire BEFORE the canvas has a chance to update.

Thus, I’m wondering if there is some sort of an event that can be fired AFTER v-stage rerenders/redraws as a result of a model/data update. Something like @redraw could be useful.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
lavrtoncommented, Oct 17, 2020

You can control what to show in toDataURL() with options x, y, width, height. So it doesn’t matter what is visible in the viewport.

0reactions
wxfredcommented, Oct 18, 2020

@lavrton Thanks! I tried with setting options width, height in a 1x1 stage, got a full size png of my scene.

layer.toDataURL({
    width: scene.w,
    height: scene.h,
});
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to trigger an event after any (re)render of a React/Redux ...
A React/Redux app that I develop needs to live inside an iframe. The surrounding document can be told to resize the iframe by...
Read more >
Rerender doesn't trigger after fireEvents with file input #664
What happened: If I upload file manually - everything works as expected. But in test cases after fireEvent rerender doesn't fired.
Read more >
Events Fired During the Rendering Lifecycle | Lightning Aura ...
Handling the render event is preferred to creating a custom renderer and overriding afterRender() . For more information, see Handle the render Event....
Read more >
React re-renders guide: everything, all at once - Developer way
The guide explains what are re-renders, what is necessary and unnecessary re-render, what can trigger a React component re-render.
Read more >
When does React re-render components? - Felix Gerschau
Using React's forceUpdate function; Force an update in React hooks. How to optimize re-renders. Controlling when a component should update ...
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