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

Make color boundary movement more responsive #4

Open
hxlnt opened this issue Feb 25, 2018 · 0 comments
Open

Make color boundary movement more responsive #4

hxlnt opened this issue Feb 25, 2018 · 0 comments
Labels
astropaint enhancement New feature or request

Comments

@hxlnt
Copy link
Owner

hxlnt commented Feb 25, 2018

Moving the color boundary is slow (around 2 seconds) because each movement requires changing the style of 400-800 divs, and 202 of these are redrawing the boundary itself (a CSS border added to 102 divs and removed from 102 divs).

There are a lot of ways to improve the sluggishness; one easy fix could be making the boundary its own div that floats on top of or underneath the Astropaint screen.

Some day, it might make sense to move to HTML5 canvas, but having each pixel be a div has benefits as well (namely, easily recoloring by div class), and it'll be a lot of work to refactor just to improve the speed on this one feature. Open to suggestions and PRs!

@hxlnt hxlnt added enhancement New feature or request astropaint labels Feb 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astropaint enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant