-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Properties of a dom p5.element, position? #579
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
Comments
Going to close this one because we decided against storing the position in Same thing applies to @lmccart is it worth making width and height private to improve p5 integrity? I wonder if there are examples or tutorials that would break though. |
it makes sense! great! |
It will certainly break a ton of examples, and also working code. Would it be a terrible idea to hook into the window |
@lmccart is this something we should try to address? |
@workergnome are you confusing the global |
Oops—I am in fact confusing those! Thank you for the clarification. |
I was trying to access the position of a slider and noticed that only the property
slider.width
andslider.heigh
are accessible.I manage to get the relative positions through
slider.elt.style.left
orslider.elt.style.top
.Wouldn't be nice to have access straight from the element like
slider.x
slider.y
? Perhaps with center mode or corner mode.The text was updated successfully, but these errors were encountered: