If I run the following code in OpenLayers 3...
console.log(map.getView().calculateExtent(map.getSize()));
map.getView().fit(map.getView().calculateExtent(map.getSize()), map.getSize());
console.log(map.getView().calculateExtent(map.getSize()));
I get the following output logged...
453350.0260566147,5335322.150098615,551079.8960333853,5508792.669307384
404485.0910682294,5248586.890494232,599944.8310217706,5595527.928911767
In my project, I would like to be able to store the current extent, so that I can reuse it later and go back to exactly the same extent. But it doesn't work as I expect it to.
It appears to be zooming out an entire zoom level.
Why is it behaving this way, and how can it get it to go back to the same extent that I had before?