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

Modified transparency to go through a range of values instead of being an on/off switch #667

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

carlo-ev
Copy link
Contributor

@carlo-ev carlo-ev commented Jun 8, 2020

'made _transparent a decimal so that opacity can be a decreasing range from 1 to options.opacity'

Fixes #311

I changed the _transparent from boolean to a decimal, the idea is that the opacity start at 1 and each click on the toolbar reduces the value by 0.1 until it the value of this.options.opacity, when it does the opacity is reset back to 1.

@sashadev-sky
Please let me know if this isn't the functionality of this feature to change it up.
Thanks.

  • PR is descriptively titled 📑 and links the original issue above 🔗
  • tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with grunt test
  • code is in uniquely-named feature branch and has no merge conflicts 📁
  • screenshots/GIFs are attached 📎 in case of UI updates
  • @mention the original creator of the issue in a comment below for help or for a review

@jywarren
Copy link
Member

Oh, this is very cool! Would you be able to share a gif of this working? Thank you!!!

@jywarren jywarren closed this Jul 5, 2020
@jywarren jywarren reopened this Jul 5, 2020
@jywarren
Copy link
Member

jywarren commented Jul 5, 2020

Hopefully after we get #680 working, we can rebase this and test it out live in GitPod!

@carlo-ev
Copy link
Contributor Author

carlo-ev commented Jul 6, 2020

Screencast-2020-07-05-202631
Sorry for the late response, right now the opacity starts in 1 and does -0.1 every click until it hits options.opacity and then goes back around.

Copy link
Member

@sashadev-sky sashadev-sky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great thank you! Sorry for the late review. You have the basic idea, the only issue here is what to do about the toolbar icon. It used to toggle between 2 icons depending on this._transparent. We need to add some sort of way to deal with the icon and make it dynamic to show interactivity - and also so the user can see what the current opacity state of the image is

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.

Get the transparency tool to work on a range
3 participants