You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a zoomLayout with size width: 5000dp, height: 3000dp and one of view with size width: 100dp, height: 100dp and position x: 3000dp, y: 1500dp, i have tried engine.panTo and engine.panBy but it moves me to different places on different zoom.
for example: I have minZoom: 1f and maxZoom: 20f
if I set zoom 6.5f and pan to the view, then everything is fine; it is displayed in the center of the screen; if I set zoom 4f, the view is displayed closer to the upper left edge of the screen.
code than pan to view looks something like that:
val screenWidth = resources.displayMetrics.widthPixels
val screenHeight = resources.displayMetrics.heightPixels
val x = view.x - (screenWidth / 2 - view.width / 2)
val y = view.y - (screenHeight / 2 - view.height / 2)
engine.panTo(x = -x, y = -y, animated = true)
The text was updated successfully, but these errors were encountered:
I have a zoomLayout with size
width: 5000dp
,height: 3000dp
and one of view with sizewidth: 100dp
, height:100dp
and positionx: 3000dp
,y: 1500dp
, i have triedengine.panTo
andengine.panBy
but it moves me to different places on different zoom.for example: I have minZoom: 1f and maxZoom: 20f
if I set zoom 6.5f and pan to the view, then everything is fine; it is displayed in the center of the screen; if I set zoom 4f, the view is displayed closer to the upper left edge of the screen.
code than pan to view looks something like that:
The text was updated successfully, but these errors were encountered: