-
Notifications
You must be signed in to change notification settings - Fork 238
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
Gradient outlines more fixes #1243
Conversation
… stroke width 0 gradients again.
…to a transparent solid color on select, because that was causing the bug where when you switched gradient twice with trans-trans, it became black-white. Instead, leave the color as a trans-trans gradient, but treat it as if its solid when switching colors. Its starting to keep track of a lot of secret state, which seems brittle...
src/helper/style-path.js
Outdated
item.strokeColor.gradient.stops[0].color.alpha === 0 && | ||
item.strokeColor.gradient.stops[1].color.alpha === 0) { | ||
// Clear the gradient if both colors are transparent | ||
item.strokeColor = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like a function which retrieves color state from shapes should not modify those shapes' colors directly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed interactively with @fsih and LGTM!
Filed another bug #1248 for more tests |
Resolves
Fixes #1224
Fixes #1239
Fixes #1230
Test branch: https://fsih.github.io/scratch-gui/gradientOutlines/
Proposed Changes
Reason for Changes
Test Coverage
Tested at a paint huddle
Tests planned later: #1216