-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
p5.js Element style example is overlapping with the website text #5010
Comments
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already. |
Hi @rt1301 thanks for the issue! I always saw this as intentional. I think the goal is to show that p5.Elements are just like any other DOM Element and can exist visually alongside other elements outside the canvas. I could be mistaken though. |
@limzykenneth Can you suggest whether this enhancement is required? If it does, I would like to work on it |
@stalgiag I have made some changes so that the font-size of the text is limited and is shown in such a way that it conveys the idea (p5.Elements are just like any other DOM Element and can exist visually alongside other elements outside the canvas) while being visually appealing and less cluttering. does this seem fine? |
@Aloneduckling thanks! to simplify, I would suggest changing this to: let fontSize = max(mouseX, 100);
myDiv.style('font-size', fontSize + 'px'); |
@lmccart, sorry for the late reply. I will change this. |
@lmccart, I have made some changes in all the examples and now they look better and less cluttering. Please have a look. Should I open a PR? |
@Aloneduckling yes please do submit a PR. There is a issue with updating the reference that I am working to resolve, so I don't have an estimated time for the next update right now. Hopefully soon. |
Most appropriate sub-area of p5.js?
Details about the bug:
The third example on the Element style reference page overlaps with the website text
Would you like to work on this issue? - Yes
The text was updated successfully, but these errors were encountered: