Docs(Marker): modify icon option description (#5529)

* Docs(Marker): modify icon option description

To explain that a _common_ / generic instance of `L.Icon.Default` is used, instead of leaving room to think that a _new instance_ of `L.Icon.Default` is created for every Marker without specified `icon` option.

See https://github.com/Leaflet/Leaflet.markercluster/issues/786#issuecomment-302893446

* Docs(Marker): replace icon class by instance

it actually needs a proper _instance_ of `L.Icon`, not a "class".
This commit is contained in:
ghybs 2017-05-24 13:03:00 +04:00 committed by Iván Sánchez Ortega
parent 7fef7964b8
commit f66d13976a

View File

@ -24,7 +24,9 @@ export var Marker = Layer.extend({
// @aka Marker options // @aka Marker options
options: { options: {
// @option icon: Icon = * // @option icon: Icon = *
// Icon class to use for rendering the marker. See [Icon documentation](#L.Icon) for details on how to customize the marker icon. If not specified, a new `L.Icon.Default` is used. // Icon instance to use for rendering the marker.
// See [Icon documentation](#L.Icon) for details on how to customize the marker icon.
// If not specified, a common instance of `L.Icon.Default` is used.
icon: new IconDefault(), icon: new IconDefault(),
// Option inherited from "Interactive layer" abstract class // Option inherited from "Interactive layer" abstract class