Skip to content

Commit

Permalink
chore(Extent): remove deprecated methods
Browse files Browse the repository at this point in the history
BREAKING CHANGE:
- Remove deprecated Extent#dimensions method
  • Loading branch information
Desplandis committed Nov 27, 2024
1 parent 78161ca commit 96a74a4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
14 changes: 0 additions & 14 deletions src/Core/Geographic/Extent.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,20 +127,6 @@ class Extent {
return target;
}

/**
* Returns the dimension of the extent, in a `THREE.Vector2`.
*
* @param {THREE.Vector2} [target] - The target to assign the result in.
*
* @return {THREE.Vector2}
*/
dimensions(target = new THREE.Vector2()) {
console.warn('Extent.dimensions is deprecated, use planarDimensions, geodeticDimensions or spatialEuclideanDimensions');
target.x = Math.abs(this.east - this.west);
target.y = Math.abs(this.north - this.south);
return target;
}

/**
* Planar dimensions are two planar distances west/east and south/north.
* Planar distance straight-line Euclidean distance calculated in a 2D Cartesian coordinate system.
Expand Down
8 changes: 0 additions & 8 deletions test/unit/extent.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,6 @@ describe('Extent', function () {
assert.equal(dimensions.y, 20);
});

it('should return the same planar dimensions with deprecated dimensions method', function () {
const extent = new Extent('EPSG:4326', -15, 10, -10, 10);
const dimensions = extent.planarDimensions();
const dimensions_2 = extent.dimensions();
assert.equal(dimensions.x, dimensions_2.x);
assert.equal(dimensions.y, dimensions_2.y);
});

it('should return the correct earth euclidean dimensions', function () {
const extent = new Extent('EPSG:4326', 3, 3.01, 46, 46.01);
const dimensions = new Vector2();
Expand Down

0 comments on commit 96a74a4

Please sign in to comment.