Docs(Bounds): change topLeft/bottomRight to corner1/2 (#5487)

as suggested in issue #5475.
The actual relative position of the given corners do not matter for the factory / constructor current functionality: it just determines the min/max coordinate values.
This commit is contained in:
ghybs 2017-05-12 00:22:00 +04:00 committed by Per Liedman
parent c7cc70f2a5
commit 2ff69debc6

View File

@ -144,11 +144,11 @@ Bounds.prototype = {
};
// @factory L.bounds(topLeft: Point, bottomRight: Point)
// Creates a Bounds object from two coordinates (usually top-left and bottom-right corners).
// @factory L.bounds(corner1: Point, corner2: Point)
// Creates a Bounds object from two corners coordinate pairs.
// @alternative
// @factory L.bounds(points: Point[])
// Creates a Bounds object from the points it contains
// Creates a Bounds object from the given array of points.
export function toBounds(a, b) {
if (!a || a instanceof Bounds) {
return a;