Attempt to animate the canonicalization process.#25
Open
huttarl wants to merge 2 commits intolevskaya:masterfrom
Open
Attempt to animate the canonicalization process.#25huttarl wants to merge 2 commits intolevskaya:masterfrom
huttarl wants to merge 2 commits intolevskaya:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I wanted to see the canonicalization process in action. So I added a little bit of code into canonicalize(), to call
at the end of each iteration. (The
awaitmeant thatcanonicalize()had to be madeasync.)But I can't test it. When I rebuild (build.sh does a concatenate and minify) and reload the page, I get this error:
SyntaxError: '[test!='']:sizzle' is not a valid selector.I've read that this has something to do with either not waiting for the page to fully load, or minify working incorrectly. I have minify 2.24.3 installed by homebrew. No idea what sort of minify was used before. When I try to modify polyhedronisme.min.js by hand, I get baffling errors ... no idea what's going on.So I offer this little change, hoping someone (e.g. @levskaya) can try it, rebuild the app, and deploy the change ... or else tell me how to fix my build process.
The
await new Promise(resolve => setTimeout(resolve, 0))is an attempt to not block the UI thread for too long and allow canvas writes to be displayed. But I don't know if it's actually helpful, or breaks things. Without it,canonicalize()doesn't need to beasync, which may make the change simpler.