Improve documentation for animation-related stuff
The animation-related code is missing sufficient detail to make it usable without digging in to the code. This adds some additional detail to the ol.animation namespace, the related options, and makes note of the existance of ol.animation in the documentation of ol.Map.addPreRenderFunction(s).
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
/**
|
||||
* The {ol.animation} static methods are designed to be used with the {@link ol.Map#addPreRenderFunction} and {@link ol.Map#addPreRenderFunctions} methods. For example:
|
||||
*
|
||||
* var map = new ol.Map({ ... });
|
||||
* var zoom = ol.animation.zoom({
|
||||
* resolution: map.getView().getResolution()
|
||||
* });
|
||||
* map.addPreRenderFunction(zoom);
|
||||
* map.getView().setResolution(map.getView().getResolution() * 2);
|
||||
*
|
||||
* @namespace ol.animation
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user