Fixed a couple of issues with spelling in documentation

This commit is contained in:
Andris Nolendorfs 2017-08-11 10:15:12 +03:00
parent 147d86a203
commit 64992d233e
14 changed files with 20 additions and 20 deletions

View File

@ -53,7 +53,7 @@ export function bind(fn, obj) {
export var lastId = 0; export var lastId = 0;
// @function stamp(obj: Object): Number // @function stamp(obj: Object): Number
// Returns the unique ID of an object, assiging it one if it doesn't have it. // Returns the unique ID of an object, assigning it one if it doesn't have it.
export function stamp(obj) { export function stamp(obj) {
/*eslint-disable */ /*eslint-disable */
obj._leaflet_id = obj._leaflet_id || ++lastId; obj._leaflet_id = obj._leaflet_id || ++lastId;

View File

@ -45,7 +45,7 @@ export function LatLng(lat, lng, alt) {
LatLng.prototype = { LatLng.prototype = {
// @method equals(otherLatLng: LatLng, maxMargin?: Number): Boolean // @method equals(otherLatLng: LatLng, maxMargin?: Number): Boolean
// Returns `true` if the given `LatLng` point is at the same position (within a small margin of error). The margin of error can be overriden by setting `maxMargin` to a small number. // Returns `true` if the given `LatLng` point is at the same position (within a small margin of error). The margin of error can be overridden by setting `maxMargin` to a small number.
equals: function (obj, maxMargin) { equals: function (obj, maxMargin) {
if (!obj) { return false; } if (!obj) { return false; }

View File

@ -212,7 +212,7 @@ LatLngBounds.prototype = {
}, },
// @method equals(otherBounds: LatLngBounds, maxMargin?: Number): Boolean // @method equals(otherBounds: LatLngBounds, maxMargin?: Number): Boolean
// Returns `true` if the rectangle is equivalent (within a small margin of error) to the given bounds. The margin of error can be overriden by setting `maxMargin` to a small number. // Returns `true` if the rectangle is equivalent (within a small margin of error) to the given bounds. The margin of error can be overridden by setting `maxMargin` to a small number.
equals: function (bounds, maxMargin) { equals: function (bounds, maxMargin) {
if (!bounds) { return false; } if (!bounds) { return false; }

View File

@ -5,7 +5,7 @@ import * as Util from '../core/Util';
/* /*
* @namespace LineUtil * @namespace LineUtil
* *
* Various utility functions for polyine points processing, used by Leaflet internally to make polylines lightning-fast. * Various utility functions for polyline points processing, used by Leaflet internally to make polylines lightning-fast.
*/ */
// Simplify polyline with vertex reduction and Douglas-Peucker simplification. // Simplify polyline with vertex reduction and Douglas-Peucker simplification.

View File

@ -6,10 +6,10 @@ import * as LineUtil from './LineUtil';
*/ */
/* @function clipPolygon(points: Point[], bounds: Bounds, round?: Boolean): Point[] /* @function clipPolygon(points: Point[], bounds: Bounds, round?: Boolean): Point[]
* Clips the polygon geometry defined by the given `points` by the given bounds (using the [Sutherland-Hodgeman algorithm](https://en.wikipedia.org/wiki/Sutherland%E2%80%93Hodgman_algorithm)). * Clips the polygon geometry defined by the given `points` by the given bounds (using the [Sutherland-Hodgman algorithm](https://en.wikipedia.org/wiki/Sutherland%E2%80%93Hodgman_algorithm)).
* Used by Leaflet to only show polygon points that are on the screen or near, increasing * Used by Leaflet to only show polygon points that are on the screen or near, increasing
* performance. Note that polygon points needs different algorithm for clipping * performance. Note that polygon points needs different algorithm for clipping
* than polyline, so there's a seperate method for it. * than polyline, so there's a separate method for it.
*/ */
export function clipPolygon(points, bounds, round) { export function clipPolygon(points, bounds, round) {
var clippedPoints, var clippedPoints,

View File

@ -71,7 +71,7 @@ Transformation.prototype = {
// @alternative // @alternative
// @factory L.transformation(coefficients: Array): Transformation // @factory L.transformation(coefficients: Array): Transformation
// Expects an coeficients array of the form // Expects an coefficients array of the form
// `[a: Number, b: Number, c: Number, d: Number]`. // `[a: Number, b: Number, c: Number, d: Number]`.
export function toTransformation(a, b, c, d) { export function toTransformation(a, b, c, d) {

View File

@ -410,7 +410,7 @@ Layer.include({
}, },
// @method openPopup(latlng?: LatLng): this // @method openPopup(latlng?: LatLng): this
// Opens the bound popup at the specificed `latlng` or at the default popup anchor if no `latlng` is passed. // Opens the bound popup at the specified `latlng` or at the default popup anchor if no `latlng` is passed.
openPopup: function (layer, latlng) { openPopup: function (layer, latlng) {
if (!(layer instanceof Layer)) { if (!(layer instanceof Layer)) {
latlng = layer; latlng = layer;

View File

@ -20,7 +20,7 @@ import * as DomUtil from '../dom/DomUtil';
* marker.bindTooltip("my tooltip text").openTooltip(); * marker.bindTooltip("my tooltip text").openTooltip();
* ``` * ```
* Note about tooltip offset. Leaflet takes two options in consideration * Note about tooltip offset. Leaflet takes two options in consideration
* for computing tooltip offseting: * for computing tooltip offsetting:
* - the `offset` Tooltip option: it defaults to [0, 0], and it's specific to one tooltip. * - the `offset` Tooltip option: it defaults to [0, 0], and it's specific to one tooltip.
* Add a positive x offset to move the tooltip to the right, and a positive y offset to * Add a positive x offset to move the tooltip to the right, and a positive y offset to
* move it to the bottom. Negatives will move to the left and top. * move it to the bottom. Negatives will move to the left and top.
@ -46,7 +46,7 @@ export var Tooltip = DivOverlay.extend({
// @option direction: String = 'auto' // @option direction: String = 'auto'
// Direction where to open the tooltip. Possible values are: `right`, `left`, // Direction where to open the tooltip. Possible values are: `right`, `left`,
// `top`, `bottom`, `center`, `auto`. // `top`, `bottom`, `center`, `auto`.
// `auto` will dynamicaly switch between `right` and `left` according to the tooltip // `auto` will dynamically switch between `right` and `left` according to the tooltip
// position on the map. // position on the map.
direction: 'auto', direction: 'auto',
@ -310,7 +310,7 @@ Layer.include({
}, },
// @method openTooltip(latlng?: LatLng): this // @method openTooltip(latlng?: LatLng): this
// Opens the bound tooltip at the specificed `latlng` or at the default tooltip anchor if no `latlng` is passed. // Opens the bound tooltip at the specified `latlng` or at the default tooltip anchor if no `latlng` is passed.
openTooltip: function (layer, latlng) { openTooltip: function (layer, latlng) {
if (!(layer instanceof Layer)) { if (!(layer instanceof Layer)) {
latlng = layer; latlng = layer;

View File

@ -40,12 +40,12 @@ export var Marker = Layer.extend({
// Set it to `true` if you want the map to do panning animation when marker hits the edges. // Set it to `true` if you want the map to do panning animation when marker hits the edges.
autoPan: false, autoPan: false,
// @option autoPanPadding: Point = Point(5, 5) // @option autoPanPadding: Point = Point(50, 50)
// Equivalent of setting both top left and bottom right autopan padding to the same value. // Equivalent of setting both top left and bottom right autopan padding to the same value.
autoPanPadding: [50, 50], autoPanPadding: [50, 50],
// @option autoPanSpeed: Number = 100 // @option autoPanSpeed: Number = 10
// Numer of pixels the map should move by. // Number of pixels the map should move by.
autoPanSpeed: 10, autoPanSpeed: 10,
// @option keyboard: Boolean = true // @option keyboard: Boolean = true

View File

@ -261,7 +261,7 @@ export var GridLayer = Layer.extend({
// @section Extension methods // @section Extension methods
// Layers extending `GridLayer` shall reimplement the following method. // Layers extending `GridLayer` shall reimplement the following method.
// @method createTile(coords: Object, done?: Function): HTMLElement // @method createTile(coords: Object, done?: Function): HTMLElement
// Called only internally, must be overriden by classes extending `GridLayer`. // Called only internally, must be overridden by classes extending `GridLayer`.
// Returns the `HTMLElement` corresponding to the given `coords`. If the `done` callback // Returns the `HTMLElement` corresponding to the given `coords`. If the `done` callback
// is specified, it must be called when the tile has finished loading and drawing. // is specified, it must be called when the tile has finished loading and drawing.
createTile: function () { createTile: function () {

View File

@ -123,7 +123,7 @@ export var TileLayer = GridLayer.extend({
// @method createTile(coords: Object, done?: Function): HTMLElement // @method createTile(coords: Object, done?: Function): HTMLElement
// Called only internally, overrides GridLayer's [`createTile()`](#gridlayer-createtile) // Called only internally, overrides GridLayer's [`createTile()`](#gridlayer-createtile)
// to return an `<img>` HTML element with the appropiate image URL given `coords`. The `done` // to return an `<img>` HTML element with the appropriate image URL given `coords`. The `done`
// callback is called when the tile has been loaded. // callback is called when the tile has been loaded.
createTile: function (coords, done) { createTile: function (coords, done) {
var tile = document.createElement('img'); var tile = document.createElement('img');

View File

@ -416,7 +416,7 @@ export var Canvas = Renderer.extend({
prev.next = next; prev.next = next;
} else if (next) { } else if (next) {
// Update first entry unless this is the // Update first entry unless this is the
// signle entry // single entry
this._drawFirst = next; this._drawFirst = next;
} }
@ -444,7 +444,7 @@ export var Canvas = Renderer.extend({
next.prev = prev; next.prev = prev;
} else if (prev) { } else if (prev) {
// Update last entry unless this is the // Update last entry unless this is the
// signle entry // single entry
this._drawLast = prev; this._drawLast = prev;
} }

View File

@ -7,7 +7,7 @@ import {toLatLngBounds} from '../../geo/LatLngBounds';
/* /*
* @class Rectangle * @class Rectangle
* @aka L.Retangle * @aka L.Rectangle
* @inherits Polygon * @inherits Polygon
* *
* A class for drawing rectangle overlays on a map. Extends `Polygon`. * A class for drawing rectangle overlays on a map. Extends `Polygon`.

View File

@ -673,7 +673,7 @@ export var Map = Evented.extend({
}, },
// TODO handler.addTo // TODO handler.addTo
// TODO Appropiate docs section? // TODO Appropriate docs section?
// @section Other Methods // @section Other Methods
// @method addHandler(name: String, HandlerClass: Function): this // @method addHandler(name: String, HandlerClass: Function): this
// Adds a new `Handler` to the map, given its name and constructor function. // Adds a new `Handler` to the map, given its name and constructor function.