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

Don't update the model unnecessarily when scaling or scrolling #3

Open
svenefftinge opened this issue Dec 13, 2018 · 2 comments
Open

Comments

@svenefftinge
Copy link
Contributor

Atm the underlying component model is recreated on every vie change. Which causes a lot of objects being created and garbage collected.
We should instead use the viewport and scaling information on an existing component model.
Separated from that the component model should only be recreated if a new data model is available.

@svenefftinge
Copy link
Contributor Author

I played around a bit with the using scale and position on the pixiJS stage object. And it works nicely. Also it cleans up the code as we no longer need to translate between logical units and viewable pixels.

Here is a snapshot with the prototype state:

Open in Gitpod

@jbicker
Copy link
Contributor

jbicker commented Jan 8, 2019

This is already done for states.
For elements which can't be scaled (because we have to preserve line thickness) we need to update the coordinates without removing and creating component objects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants