Rename ol.extent.transform to ol.extent.applyTransform

This gives more consistency with ol.proj.applyTransform, allowing us to add a more convenient ol.extent.transform method that takes projection-like arguments.
This commit is contained in:
Tim Schaub
2014-05-02 10:13:28 -06:00
parent a4f1efbddb
commit 015aab8af3
4 changed files with 12 additions and 7 deletions
+4 -2
View File
@@ -714,13 +714,15 @@ ol.extent.touches = function(extent1, extent2) {
/**
* Apply a transform function to the extent.
* @param {ol.Extent} extent Extent.
* @param {ol.TransformFunction} transformFn Transform function.
* @param {ol.TransformFunction} transformFn Transform function. Called with
* [minX, minY, maxX, maxY] extent coordinates.
* @param {ol.Extent=} opt_extent Destination extent.
* @return {ol.Extent} Extent.
* @todo api
*/
ol.extent.transform = function(extent, transformFn, opt_extent) {
ol.extent.applyTransform = function(extent, transformFn, opt_extent) {
var coordinates = [
extent[0], extent[1],
extent[0], extent[3],