Commit Graph
21 Commits
Author SHA1 Message Date
Andy Hanson 45c9246c09 Remove esModuleInterop from tsconfigs (no longer mandatory) 2018-02-14 14:55:13 -08:00
Andy bef4d2b27d Enable "esModuleInterop" in all tsconfigs (#23354) 2018-02-05 11:01:56 -08:00
Andrew Pinkham 021cf2a985 Fix Leaflet.Draw.DrawEvents.Created.layer type (#23137)
The DrawEvents.Created layer variable is not of type Layer. As noted by
the in-code documentation, the Leaflet.Draw.DrawEvents.Created.layer
variable is one of Leaflet's vector shapes or a markers.

https://github.com/Leaflet/Leaflet.draw/blob/c6af99b761c5d9900bf5a3e2e1d8827bbde29542/src/Leaflet.Draw.Event.js#L31

The L.Draw.Event.CREATED event is only fired by Draw.Feature in the
_fireCreatedEvent method.

Draw.Feature bequeaths _fireCreatedEvent to it's subclasses Draw.Marker,
Draw.Polyline, and Draw.SimpleShape, which in turn bequeath the method
to  Draw.Circle, Draw.Rectangle (both from Draw.SimpleShape),
Draw.CircleMarker (from Draw.Marker), and Draw.Polygon (from
Draw.Polyline).

Draw.Circle, Draw.CircleMarker, Draw.Marker, Draw.Rectangle and
Draw.Polyline override the _fireCreatedEvent to pass instances of their
respective vector classes to _fireCreatedEvent, meaning that the layer
variable is not of type Layer, but instead one of the vector or marker
classes. For example, Draw.Circle passes L.Circle to
L.Draw.Feature.prototype._fireCreatedEvent as the argument to the
`layer` parameter.

Note that Draw.Polygon inherits Draw.Polyline's behavior without
changes, but changes the vector class via the Poly class variable.
2018-01-24 09:01:32 -08:00
emmalivingstone 6d9f483c8c Fixing trailing whitespace 2017-11-14 15:52:27 +00:00
emmalivingstone 333be3d3bd Adding types for Circle Marker 2017-11-14 15:01:50 +00:00
Andy 4a0d3be1c0 leaflet-*: Fix lint (#20841) 2017-10-22 11:27:58 -07:00
Andy 947a8fb761 Enable strictFunctionTypes (#20373) 2017-10-06 14:03:03 -07:00
YunS-Stacy f5671de712 format code 2017-09-19 21:54:54 -04:00
YunS-Stacy 262e3ec0c4 add public methods to L.Draw.Feature 2017-09-19 21:20:37 -04:00
Yun Shi b1f90b093f super prototype 2017-09-14 13:34:01 -04:00
Yun Shi e1251442e9 set strictNullChecks to true 2017-09-14 13:02:44 -04:00
Yun Shi 4c389ad82c added leaflet-draw handlers 2017-09-14 12:55:50 -04:00
Alejandro Sánchez b5eaa88e9e Updated leaflet typings to match v1.2.x and to use newer typescript features 2017-08-24 17:18:50 -06:00
Andy 5d6c651a1a Apply stricter lint rules (#19063) 2017-08-17 14:53:41 -07:00
Denis 1e51efa5be Add leaflet-draw tests 2017-07-05 12:41:50 -04:00
Max Battcher 7ba15010a5 Support Leaflet-draw explicit false options
This matches the documentation better where most of the Leaflet Draw documentation encourages to use explicit false options (rather than null), as seen in the type comments already in the typing file.
2017-06-30 15:15:41 -04:00
Michael 763222ecf2 Edit property is not required for new control (#16739) 2017-06-02 08:14:21 -07:00
soucekv 9e53c56b13 leaflet-draw: Draw events should extend base leaflet event (#16673) 2017-06-02 07:29:45 -07:00
Andy bbc61fbf93 Extend "dtslint/dt.json" directly instead of "../tslint.json". (#15822)
* Extend "dtslint/dt.json" directly instead of "../tslint.json".

* Convert more "../tslint.json" to "dtslint/dt.json"

* no-redundant-modifiers -> strict-export-declare-modifiers
2017-04-14 08:04:05 -07:00
Andy b6c343f2b3 Apply new lint rules to yet more packages (#15548)
* Apply new lint rules to yet more packages

* Fix leaflet lint
2017-03-31 11:01:26 -07:00
Andy Hanson 354cec620d Move all packages to a types directory 2017-03-24 14:27:52 -07:00