I added a function to the API, center(fit?: boolean), which will center the scene of DOM or SVG. I believe this addresses a common use case, allowing users to build UI buttons without worrying about moveTo or moveBy to center. center(true) will center and reset zoom.
I added a function to the API,
center(fit?: boolean)
, which will center the scene of DOM or SVG. I believe this addresses a common use case, allowing users to build UI buttons without worrying aboutmoveTo
ormoveBy
to center.center(true)
will center and reset zoom.