Skip to content

setCenter()

Move the object so its center sits at the given point.

toggle.setCenter(x, y)

Parameters

toggle.setCenter(x, y)
Parameter Type Default Description
x int or float required The new horizontal position of the center, in pixels.
y int or float required The new vertical position of the center, in pixels.