Add notes to classes which don't inherit Class (#5878)
* Add note about LatLng not inheriting Class Fixes #3301. * Add note about LatLngBounds, Bounds, Point, CRSs and projections not inheriting Class
This commit is contained in:
parent
0f5507d2a7
commit
ca6aff0295
@ -21,6 +21,10 @@ import {toLatLngBounds} from './LatLngBounds';
|
||||
* map.panTo({lat: 50, lng: 30});
|
||||
* map.panTo(L.latLng(50, 30));
|
||||
* ```
|
||||
*
|
||||
* Note that `LatLng` does not inherit from Leafet's `Class` object,
|
||||
* which means new classes can't inherit from it, and new methods
|
||||
* can't be added to it with the `include` function.
|
||||
*/
|
||||
|
||||
export function LatLng(lat, lng, alt) {
|
||||
|
@ -24,6 +24,10 @@ import {LatLng, toLatLng} from './LatLng';
|
||||
* ```
|
||||
*
|
||||
* Caution: if the area crosses the antimeridian (often confused with the International Date Line), you must specify corners _outside_ the [-180, 180] degrees longitude range.
|
||||
*
|
||||
* Note that `LatLngBounds` does not inherit from Leafet's `Class` object,
|
||||
* which means new classes can't inherit from it, and new methods
|
||||
* can't be added to it with the `include` function.
|
||||
*/
|
||||
|
||||
export function LatLngBounds(corner1, corner2) { // (LatLng, LatLng) or (LatLng[])
|
||||
|
@ -15,6 +15,10 @@ import * as Util from '../../core/Util';
|
||||
* Leaflet defines the most usual CRSs by default. If you want to use a
|
||||
* CRS not defined by default, take a look at the
|
||||
* [Proj4Leaflet](https://github.com/kartena/Proj4Leaflet) plugin.
|
||||
*
|
||||
* Note that the CRS instances do not inherit from Leafet's `Class` object,
|
||||
* and can't be instantiated. Also, new classes can't inherit from them,
|
||||
* and methods can't be added to them with the `include` function.
|
||||
*/
|
||||
|
||||
export var CRS = {
|
||||
|
@ -15,6 +15,10 @@
|
||||
* The inverse of `project`. Projects a 2D point into a geographical location.
|
||||
* Only accepts actual `L.Point` instances, not arrays.
|
||||
|
||||
* Note that the projection instances do not inherit from Leafet's `Class` object,
|
||||
* and can't be instantiated. Also, new classes can't inherit from them,
|
||||
* and methods can't be added to them with the `include` function.
|
||||
|
||||
*/
|
||||
|
||||
export {LonLat} from './Projection.LonLat';
|
||||
|
@ -19,6 +19,10 @@ import {Point, toPoint} from './Point';
|
||||
* ```js
|
||||
* otherBounds.intersects([[10, 10], [40, 60]]);
|
||||
* ```
|
||||
*
|
||||
* Note that `Bounds` does not inherit from Leafet's `Class` object,
|
||||
* which means new classes can't inherit from it, and new methods
|
||||
* can't be added to it with the `include` function.
|
||||
*/
|
||||
|
||||
export function Bounds(a, b) {
|
||||
|
@ -18,6 +18,10 @@ import {isArray, formatNum} from '../core/Util';
|
||||
* map.panBy([200, 300]);
|
||||
* map.panBy(L.point(200, 300));
|
||||
* ```
|
||||
*
|
||||
* Note that `Point` does not inherit from Leafet's `Class` object,
|
||||
* which means new classes can't inherit from it, and new methods
|
||||
* can't be added to it with the `include` function.
|
||||
*/
|
||||
|
||||
export function Point(x, y, round) {
|
||||
|
Loading…
Reference in New Issue
Block a user