Leaflet/spec/suites/geometry
ghybs f677f9c6d2 Feat(Bounds): add new methods for 2 missing corners (#5488)
* Feat(Bounds): add getTopLeft & getBottomRight methods

as suggested in #5475, for consistency with `LatLngBounds` methods which already provide methods for the 4 possible corners.
Also include the docstrings.

* Docs(Bounds): add comments to identify corners

in BoundsSpec.

* Test(Bounds): add tests for existing corner methods

namely getBottomLeft and getTopRight.
Checked that expecting different values make the tests fail.

* Test(Bounds): add spec for 2 new corner methods

namely getTopLeft and getBottomRight.
Closes #5475 together with previous PR #5487.

* Refactor(Bounds): return this.min(max) instead of new Point

as TopLeft corner is tha same as this.min (BottomRight same as this.max).

* Docs(Bounds): add links to this.min(max)

to make it clearer that these methods are just shorthands to already available properties.
Furthermore, it implies that they output those properties directly, making a clue for the app developer that if he/she wants to modify them, they should be cloned before doing so in order to prevent unintentional behaviour.
2017-05-11 22:24:15 +02:00
..
BoundsSpec.js Feat(Bounds): add new methods for 2 missing corners (#5488) 2017-05-11 22:24:15 +02:00
LineUtilSpec.js Remove trailing whitespace 2015-02-06 16:36:27 -08:00
PointSpec.js create points from objects with x and y properties (#4465) 2016-04-20 17:05:31 +02:00
PolyUtilSpec.js fix whitespace in comments 2015-09-25 15:37:07 +03:00
TransformationSpec.js Add L.transformation factory, allow creation from array (#5282) 2017-01-30 09:43:50 +01:00