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

Fix Frozen line pattern when switching artists #20549

Merged
merged 1 commit into from Feb 13, 2018

Conversation

joshlory
Copy link
Contributor

selectPattern() calls setPattern(), which clears out the pattern if it's not loaded yet. Since we just started loading and haven't yielded, there's no way the pattern could be loaded yet. Use a promise to select the pattern once it's loaded.

if (this.loadedPathPatterns[pattern]) {
this.currentPathPattern = this.loadedPathPatterns[pattern];
this.isDrawingWithPattern = true;
} else if (pattern === null) {
this.currentPathPattern = new Image();
this.isDrawingWithPattern = false;
}

# Conflicts:
#	apps/src/turtle/turtle.js
@joshlory joshlory merged commit 5244615 into staging Feb 13, 2018
@joshlory joshlory deleted the frozen-line-pattern-switch branch February 13, 2018 17:13
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

Successfully merging this pull request may close these issues.

None yet

2 participants