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

p5.js Element style example is overlapping with the website text #5010

Closed
1 of 17 tasks
rt1301 opened this issue Jan 24, 2021 · 9 comments · Fixed by #5084
Closed
1 of 17 tasks

p5.js Element style example is overlapping with the website text #5010

rt1301 opened this issue Jan 24, 2021 · 9 comments · Fixed by #5084

Comments

@rt1301
Copy link
Contributor

rt1301 commented Jan 24, 2021

Most appropriate sub-area of p5.js?

  • Accessibility (Web Accessibility)
  • Build tools and processes
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Friendly error system
  • Image
  • IO (Input/Output)
  • Localization
  • Math
  • Unit Testing
  • Typography
  • Utilities
  • WebGL
  • Other (specify if possible)

Details about the bug:

  • Web browser and version: Chromium 88.0.4324.96
  • Operating System: Ubuntu 20.04
  • Steps to reproduce this:

The third example on the Element style reference page overlaps with the website text
Screenshot from 2021-01-24 23-23-25

Would you like to work on this issue? - Yes

@rt1301 rt1301 added the Bug label Jan 24, 2021
@welcome
Copy link

welcome bot commented Jan 24, 2021

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.

@stalgiag
Copy link
Contributor

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.

@rt1301
Copy link
Contributor Author

rt1301 commented Feb 22, 2021

@limzykenneth Can you suggest whether this enhancement is required? If it does, I would like to work on it

@Aloneduckling
Copy link
Contributor

@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.

image
image

does this seem fine?

@lmccart
Copy link
Member

lmccart commented Mar 10, 2021

@Aloneduckling thanks! to simplify, I would suggest changing this to:

let fontSize = max(mouseX, 100);
myDiv.style('font-size', fontSize + 'px');

@Aloneduckling
Copy link
Contributor

@lmccart, sorry for the late reply. I will change this.

@Aloneduckling
Copy link
Contributor

@lmccart, I have made some changes in all the examples and now they look better and less cluttering. Please have a look.

image

Should I open a PR?

@Aloneduckling
Copy link
Contributor

Aloneduckling commented Mar 12, 2021

Also, I wanted to know how much time it takes for the online reference manual to get updated. I asked because I opened this PR which got merged a while ago, and the website doesn't seem to be updated. This is the page for reference.

@lmccart
Copy link
Member

lmccart commented Mar 12, 2021

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants