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

setTheme() border size bug #126

Closed
acirinelli opened this issue Mar 20, 2021 · 3 comments
Closed

setTheme() border size bug #126

acirinelli opened this issue Mar 20, 2021 · 3 comments

Comments

@acirinelli
Copy link

acirinelli commented Mar 20, 2021

When the border size is set to 0, setTheme does not work at all.
When the border size is set to 1, setTheme randomly picks from colors and grayscale.
setTheme() only seems to be working correctly when using a border size of 2+

Could this be a confusion with true/false somewhere in the code?

@uyab uyab closed this as completed in 66d0330 Mar 25, 2021
@uyab
Copy link
Contributor

uyab commented Mar 25, 2021

Patch version tagged: 4.1.2

@uyab
Copy link
Contributor

uyab commented Mar 25, 2021

Sorry, I think it was by design:

// OK, call setXX after create()
app('avatar')->create('John')->setTheme('pastel')->setBorder(5, '#FFFFFF')->toBase64();

// NOT OK, call setXX before create(), because create($name) is what make the avatar can be generated based on $name supplied
// So, basically if you call setXXX() before create(), your overriden theme will be overriden again by create()
app('avatar')->setTheme('pastel')->setBorder(5, '#FFFFFF')->create('John')->toBase64();

@uyab uyab reopened this Mar 25, 2021
@uyab uyab closed this as completed in 3ab66e3 Mar 25, 2021
@uyab uyab reopened this Mar 25, 2021
@acirinelli
Copy link
Author

Looks like you may still be tweaking things, but updating to 4.1.3 seems to have resolved this issue for me.

@uyab uyab closed this as completed Mar 25, 2021
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