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

Added this.rectMode support #29

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

sahej-dev
Copy link

I have added support for all P5 rectModes. All the following are valid:

myButton = new Clickable();
myButton.rectMode = CORNER; // Default
myButton.rectMode = CORNERS;
myButton.rectMode = CENTER;
myButton.rectMode = RADIUS;
  • Click area, button rect, image, and text scaling should be working, as expected with all the rectModes.
  • Changing rectMode by doing (for e.g. rectMode(CENTER) should no longer affect clickables. myButton.rectMode = CENTER must be used.
  • I have also update the minified version with the latest version of the library.

I have tried not to change up the existing structure of the library too much. Please let me know if I should make any further improvements/changes to this PR.

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.

1 participant