Coming across some odd and unexpected behavior with states and draggable/pinchable layers.
Here I have a map layer that is positioned in the middle of the view. I can drag to pan and pinch to zoom. The "Reset" button calling mapLayer.states.switch("default") to get the map back to its default positioning, but things are getting weird...
2 issues –
1. The reset button does not work reliably. I can pan the map layer and then tap Reset, and its possible that nothing may happen. Not sure what the repro is here. Sometimes it resets the state properly, sometimes it does nothing at all. And sometimes it moves the layer to an X/Y that doesn't match the default state.
2. When the scale of the map layer is adjusted and I'm able to successfully trigger the Reset state switch, the map layer moves in a really unusual arc. I just want to move directly back to the original position and scale in a linear movement.
Anyone have pointers on how I can mitigate these issues?