Skip to content

Commit c3426d6

Browse files
committed
docstring fixes regarding Polyline/Circle options
1 parent 86e49f9 commit c3426d6

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

src/layer/vector/Circle.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ L.Circle = L.CircleMarker.extend({
2626

2727
if (isNaN(this.options.radius)) { throw new Error('Circle radius cannot be NaN'); }
2828

29+
// @section
30+
// @aka Circle options
2931
// @option radius: Number; Radius of the circle, in meters.
3032
this._mRadius = this.options.radius;
3133
},
@@ -91,11 +93,11 @@ L.Circle = L.CircleMarker.extend({
9193
}
9294
});
9395

94-
// @factory L.circle(latlng: LatLng, options?: Path options)
96+
// @factory L.circle(latlng: LatLng, options?: Circle options)
9597
// Instantiates a circle object given a geographical point, and an options object
9698
// which contains the circle radius.
9799
// @alternative
98-
// @factory L.circle(latlng: LatLng, radius: Number, options?: Path options)
100+
// @factory L.circle(latlng: LatLng, radius: Number, options?: Circle options)
99101
// Obsolete way of instantiating a circle, for compatibility with 0.7.x code.
100102
// Do not use in new applications or plugins.
101103
L.circle = function (latlng, options, legacyOptions) {

src/layer/vector/CircleMarker.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
L.CircleMarker = L.Path.extend({
1010

11+
// @section
12+
// @aka CircleMarker options
1113
options: {
1214
fill: true,
1315

@@ -85,8 +87,8 @@ L.CircleMarker = L.Path.extend({
8587
});
8688

8789

88-
// @factory L.circleMarker(latlng: LatLng, options? CircleMarker options)
89-
//
90+
// @factory L.circleMarker(latlng: LatLng, options?: CircleMarker options)
91+
// Instantiates a circle marker object given a geographical point, and an optional options object.
9092
L.circleMarker = function (latlng, options) {
9193
return new L.CircleMarker(latlng, options);
9294
};

src/layer/vector/Path.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ L.Path = L.Layer.extend({
3737
lineJoin: 'round',
3838

3939
// @option dashArray: String = null
40-
// A string that defines the stroke [dash pattern](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-dasharray). Doesn't work on canvas-powered layers (e.g. Android 2).
40+
// A string that defines the stroke [dash pattern](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-dasharray). Doesn't work on `Canvas`-powered layers in [some old browsers](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility).
4141
dashArray: null,
4242

4343
// @option dashOffset: String = null
44-
// A string that defines the [distance into the dash pattern to start the dash](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-dashoffset). Doesn't work on canvas-powered layers
44+
// A string that defines the [distance into the dash pattern to start the dash](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-dashoffset). Doesn't work on `Canvas`-powered layers in [some old browsers](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility).
4545
dashOffset: null,
4646

4747
// @option fill: Boolean = depends

src/layer/vector/Polyline.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838

3939
L.Polyline = L.Path.extend({
4040

41+
// @section
42+
// @aka Polyline options
4143
options: {
4244
// @option smoothFactor: Number = 1.0
4345
// How much to simplify the polyline on each zoom level. More means
@@ -275,7 +277,7 @@ L.Polyline = L.Path.extend({
275277
}
276278
});
277279

278-
// @factory L.polyline(latlngs: LatLng[], options?: Path options)
280+
// @factory L.polyline(latlngs: LatLng[], options?: Polyline options)
279281
// Instantiates a polyline object given an array of geographical points and
280282
// optionally an options object. You can create a `Polyline` object with
281283
// multiple separate lines (`MultiPolyline`) by passing an array of arrays

0 commit comments

Comments
 (0)