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
Feature request: resizeTo redraw #6081
Comments
Maybe a resize event on the Application’s renderer and/or stage Container would be good? So you could respond to resize events from there and pass them to your children display objects. Also, would welcome a resize throttle PR to fix that performance issue you’re experiencing. |
Yes maybe or a proxy variable, if that's possible. The same way CSS has Ok I will try. |
Adding a resize event is a good start and would be a simple PR if you or someone wants to take a stab at it. |
What are you mean? Add relative position to Container element? |
@eXponenta Yes, relative positions. |
I agree that layout should be a plugin and not implemented directly in core. But the resize event could pass along the width/height, viewport and frame of the renderer. Should be more than enough to calculate anything you need relatively. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Expected Behavior
If a PIXI
Application
has aresizeTo
element, it would be nice if the element positions inside the application would also update when resizing. Plus some throttling on the resize event would help avoid performance problems.If this functionality is too complicated to implement (or already present), a best practice example of a responsive application would be very helpful.
Current Behavior
Only the canvas is resized.
Environment
pixi.js
version: 5.1.3The text was updated successfully, but these errors were encountered: