Vladimir Agafonkin
5841579bb8
Merge pull request #2025 from Gnurfos/issue-1915
...
Accept simple objects in L.latLngBounds(). Fixes #1915 .
2013-09-13 02:14:03 -07:00
Seb Emonet
16f9c9a302
Accept simple objects in L.latLngBounds(). Fixes #1915 .
2013-09-13 00:22:19 +02:00
Vladimir Agafonkin
a086b336b2
fix images 404 warnings in specs
2013-09-12 13:14:00 +03:00
Vladimir Agafonkin
f04527b308
update karma config to work on version 0.10
2013-09-12 13:13:49 +03:00
Alexander Parshin
df320c3b06
Add test specifications for CRS classes.
2013-09-10 11:40:48 +04:00
Vladimir Agafonkin
f91d2d82da
update happen and references to it to fix build, hello @tmcw
2013-09-09 11:47:09 +03:00
Vladimir Agafonkin
5e30c51f85
add GeoJSON rountripping of GeometryCollection and MultiPoint, close #1956
2013-08-28 12:43:04 +03:00
Vladimir Agafonkin
21d8bde0b7
fix tempate interpolation test and build
2013-08-27 22:06:01 +03:00
Vladimir Agafonkin
1581a94fc3
Merge branch 'interpolation' of https://github.com/calvinmetcalf/Leaflet
...
* 'interpolation' of https://github.com/calvinmetcalf/Leaflet :
'#1968 compiled interpolation'
2013-08-27 21:28:38 +03:00
Calvin Metcalf
b2b25c8941
' #1968 compiled interpolation'
2013-08-27 13:03:07 -04:00
fastrde
a8a8ebe309
added a spec test for worldCopyJump set Center and Zoom fix #1982
2013-08-18 03:18:21 +02:00
Vladimir Agafonkin
e18b7eded6
Merge pull request #1931 from russelldavis/fix-invalidate-size
...
Fix rounding issues in Map::invalidateSize
2013-08-06 02:43:40 -07:00
John Firebaugh
a0c6363bb6
Invalidate _initialCenter along with size ( fixes #1919 )
2013-08-05 14:09:09 -07:00
Russell Davis
f568768142
Fix rounding issues in Map::invalidateSize
2013-08-01 23:14:11 -07:00
Vladimir Agafonkin
7c744d06e6
add getMinZoom test for #1866
...
[skip ci]
2013-07-25 12:44:55 +03:00
Vladimir Agafonkin
75c133082c
fix Map min/maxZoom not overriding TileLayer-derived min/max, close #1848
2013-07-12 15:05:59 +03:00
danzel
ec3b9e0ff2
Add a few more featuregroup tests and fix regression of removeLayer.
2013-07-12 10:13:25 +12:00
Aaron Rutkovsky
0e34b8caf2
PosAnimation tests
2013-07-11 12:30:15 -05:00
John Firebaugh
4839c44509
Fire layerremove after removing the layer
...
This is consistent with 0.5.x and seems more useful. Updating
the state of a layer switcher using map.hasLayer in response
to layeradd and layerremove events is my use case.
2013-07-08 16:53:04 -07:00
Hans Kristian Flaatten
8e98e52b88
Renames L.LatLng property .altitude to .alt
2013-07-03 15:44:57 +02:00
Hans Kristian Flaatten
46885de00d
Adds support for altitude and 3D GeoJSON
...
This commit adds a third parameter to the L.LatLon class for specifying
altitude. This is in turn stored in the `.latitude` property for the LatLng
instance. Latitude property will only be set if the latitude parameter is not
undefined, this is done in order to ensure backwards compability.
```javascript
var latlng = new L.LatLng(10, 20, 30);
console.log(latlng.altitude); // prints '30' to the console
```
Similar functionality has been added to L.GeoJSON coordsToLatLng() and
latLngToCoords() methods in order to handle import and export of 3D GeoJSON.
```javascript
var geoJSON = {
type: 'Feature'
,properties: {}
,geometry: {
type: 'Point'
,coordinates: [20, 10, 30]
}
}
var layer = new L.GeoJSON();
layer.addData(geoJSON);
console.log(layer.getLayers()[0].getLatLng().altitude);
```
`NB` It is important to notice that no logic has been added in order to prevent
latitude and longitude to change without appropirate change in altitude – this
must be handled by the application.
2013-07-03 10:13:00 +02:00
John Firebaugh
475e736346
Revert "Consistent mouse event propagation in Marker and Path"
...
This reverts commit 4015f49615
.
2013-06-28 16:22:20 -04:00
John Firebaugh
4015f49615
Consistent mouse event propagation in Marker and Path
...
Marker was missing mouseup and mousemove.
Path was missing mouseup.
2013-06-28 14:44:10 -04:00
John Firebaugh
1b7977a259
Manage happen.js with npm and upgrade it
2013-06-28 14:44:10 -04:00
Vladimir Agafonkin
cdc65c6c6b
add Circle & CircleMarker toGeoJSON
2013-06-25 12:43:22 -04:00
John Firebaugh
2c22d13ab8
Fix test
2013-06-24 14:39:23 -04:00
John Firebaugh
e7d0fb1b37
Normalize all toGeoJSON output to Features
2013-06-24 14:30:24 -04:00
Vladimir Agafonkin
54befc9203
fix True Mercator projection calculations, close #1578
2013-06-24 10:42:15 -04:00
danzel
19d49e027f
Add another test for marker/shadow reuse
2013-06-24 08:54:40 +12:00
Paul Bonaud
1af9769ed0
Toggle the display of a marker s popup on click
2013-06-16 22:13:31 +02:00
danzel
1a1cfb2e60
Make Marker setIcon unit tests better.
2013-06-12 16:18:20 +12:00
danzel
fa45913505
Make Icon/DivIcon reuse not try reuse the wrong dom element type.
2013-06-12 16:05:42 +12:00
danzel
7f2eff363b
Add support to DivIcon for reusing a div. Fixes #1753 . Still issues remain (Can't change a marker with a DivIcon to have an image Icon or vice versa)
2013-06-12 15:55:03 +12:00
John Firebaugh
4802561e0e
Don't fire layerremove if layeradd was never fired
2013-06-01 22:16:53 -07:00
John Firebaugh
51fccc80fe
Don't call Layer#onAdd on a layer that has been removed
2013-06-01 22:11:42 -07:00
John Firebaugh
055b3393da
Don't call Layer#onRemove if Layer#onAdd was never called
2013-06-01 21:50:18 -07:00
Andrii Korzh
d1aa0f3b7e
Update LatLngBoundsSpec.js
2013-05-18 13:27:45 +03:00
John Firebaugh
ade9c943ff
Popup-specific closeOnClick option
2013-05-10 15:22:03 -07:00
Vladimir Agafonkin
0849d06c1b
fix whitespace in event spec, #1661
2013-05-08 12:58:50 +03:00
R. Merkert
bbb7acb3f4
Make sure events don't fire after listener is removed.
...
This patch fixes a problem with a dangling event listener, which is
called even after it has been removed. This situation can occur when a
listener is removed during an even dispatch.
To fix this problem, the old action is replaced with a NOOP, so that
when the listener is being fired, it is not the old listener but the
NOOP.
2013-05-07 20:16:25 -04:00
John Firebaugh
c9e2453eed
Bounds-check array access in Polygon#initialize
2013-05-02 16:17:04 -07:00
Daan Mortier
c6620859e4
Updated patch for issue #1631 based on feedback
2013-04-29 13:03:05 +02:00
Daan Mortier
52498f1ef9
Issue #1631 : Fixed a bug on removeEventListener
...
Bugfix for issue #1631 where removeEventListener would throw when no event listeners are registered on the object.
2013-04-29 11:53:16 +02:00
Vladimir Agafonkin
7cb7993571
simplify popup methods, merge #738
2013-04-20 16:58:42 +03:00
Vladimir Agafonkin
412f047533
Merge pull request #1462 from jfirebaugh/toGeoJSON
...
Add #toGeoJSON to various layer types (#712 )
2013-04-19 09:55:40 -07:00
Vladimir Agafonkin
5647f37ae6
cleanup and merge #1596 , adds Events#once
2013-04-19 17:23:45 +03:00
Vladimir Agafonkin
a5e8bc0f49
add Util.invokeEach for hash arguments in event methods
2013-04-19 17:23:14 +03:00
iirvine
84ad7db070
clearEventListeners -> clearAllListeners
2013-04-15 14:09:32 -07:00
iirvine
2d5bf783fe
initial commit of #clearEventListeners
2013-04-15 14:09:32 -07:00
iirvine
031086681f
fix our context to the object that's registering this listener
2013-04-14 20:49:57 -07:00
iirvine
a469a387a1
back to first implementation to fix event leak
2013-04-13 22:11:01 -07:00
iirvine
e25f730b04
better implementation, more tests
2013-04-12 17:03:14 -07:00
iirvine
e41e8a886a
initial implementation of events#once
2013-04-12 15:21:48 -07:00
Tom MacWright
22810aacf7
Throw an exception if a map div is not found
...
and test for initialization exceptions
2013-04-08 12:28:27 -04:00
Vladimir Agafonkin
6009d4ae87
move phantomjs check for touch into Leaflet
...
to allow standalone mocha-phantomjs usage on the browser reporter
2013-04-05 12:32:19 +03:00
John Firebaugh
0e9b7249d8
Convert to expect.js assertions
2013-04-04 09:47:45 -07:00
John Firebaugh
55edd44678
Add #toGeoJSON to various layer types ( #712 )
2013-04-04 09:46:18 -07:00
John Firebaugh
81f21125d4
Update specs for mocha
2013-04-03 15:22:45 -07:00
John Firebaugh
a950e6873e
Manage mocha dependency with npm; update to 1.9.0
2013-04-03 15:20:15 -07:00
John Firebaugh
a8ca5a2dbf
Update mocha.js
2013-04-03 14:50:10 -07:00
Tom MacWright
8691889d49
Proper default for delta
2013-04-03 14:50:10 -07:00
Tom MacWright
bf99fdb70e
Tighter tolerance for point-near check
2013-04-03 14:50:10 -07:00
Tom MacWright
a3ab4b1095
Fix mercator tests, these are broken in Leaflet master.
2013-04-03 14:50:10 -07:00
Tom MacWright
a2f7d7e834
Use mocha
2013-04-03 14:50:09 -07:00
John Firebaugh
28daa9e9b1
testacular -> karma
2013-04-03 14:12:51 -07:00
danzel
9d4d894450
Add another events test and fix from @iirvine
2013-03-15 13:53:03 +13:00
danzel
44cbed0b5e
Replace the FeatureGroup test with a better one in events, this one currently fails
2013-03-13 10:08:04 +13:00
danzel
e2a852639a
Add failing test case for #1495 from @iirvine
2013-03-12 17:24:46 +13:00
danzel
9300c58262
Fix copy/paste bug
2013-03-12 17:12:06 +13:00
Tom MacWright
71d17180c8
Add layerGroup#getLayers and tests. Fixes #1460
2013-02-27 17:10:19 -05:00
John Firebaugh
511fbb9f44
Add Map#eachLayer ( fixes #1457 )
2013-02-26 11:39:00 -08:00
John Firebaugh
bee90ce0e5
Fix whitespace
2013-02-26 11:31:23 -08:00
Vladimir Agafonkin
9c2e7cfbd4
add Point contains method
2013-02-22 17:28:55 +02:00
John Firebaugh
46dddc895c
Fire an unload event on removal
...
Plugins that need to bind events to `window` or `document`
can attach a listener for this event and unbind their event
handlers.
However, for symmetry, unload is fired only if load has been
fired.
2013-02-21 17:31:09 -08:00
Vladimir Agafonkin
9c9d4286a1
Merge pull request #1439 from danzel/convert_option
...
Make Polyline/Polygon not overwrite the source array
2013-02-21 00:08:48 -08:00
Vladimir Agafonkin
501b179bbd
fix 404 error in TileLayer tests
2013-02-20 21:22:47 +02:00
Vladimir Agafonkin
3063fd9192
Merge pull request #1433 from tmcw/layer-container
...
Add a public API for getContainer for TileLayer
2013-02-20 09:48:19 -08:00
John Firebaugh
fb9450f975
Force touch support off for PhantomJS
...
PhantomJS has `'ontouchstart' in document.documentElement`, but
doesn't actually support touch.
http://code.google.com/p/phantomjs/issues/detail?id=375
https://github.com/ariya/phantomjs/pull/408
https://github.com/Leaflet/Leaflet/pull/1434#issuecomment-13843151
2013-02-20 09:17:06 -08:00
Tom MacWright
d8fccfb3dc
Spacing.
2013-02-19 21:15:36 -05:00
John Firebaugh
6ef25866eb
Add Map#remove
...
This is a minimal implementation; it only unbinds events
and deletes the _leaflet flag from the container.
Refs #1101 .
2013-02-19 17:36:03 -08:00
Tom MacWright
8735b87980
Add public getContainer API to TileLayer, and test for it.
2013-02-19 20:05:44 -05:00
danzel
5873914062
Start on some Polyline/Polygon tests.
2013-02-20 11:03:37 +13:00
Vladimir Agafonkin
0b14d71d7a
Merge pull request #1427 from jfirebaugh/should
...
Omit "should" in spec descriptions
2013-02-19 12:54:33 -08:00
Dave Leaver
db2352ae9b
Merge pull request #1424 from tmcw/use-tobe
...
Use tobe instead of testing the result of an equality
2013-02-19 12:49:04 -08:00
John Firebaugh
01332ebead
Omit "should" in spec descriptions
...
The rationale is this: the spec string describes the expected
behavior unconditionally. The code examples, on the other hand,
set up an expectation that is tested with the call to the expect
method. The code examples can violate the expectation, but the
spec string does not. The value of the spec string is as clearly
as possible describing the behavior. Including “should” in that
description adds no value. (From http://rubyspec.org/style_guide/ )
2013-02-19 12:41:48 -08:00
Tom MacWright
a324759268
Use tobe instead of testing the result of an equality
2013-02-19 14:21:06 -05:00
Vladimir Agafonkin
b84b83bf93
fix setView test, #1420
2013-02-19 19:25:49 +02:00
Tom MacWright
1b03d5d0b4
Test setView. The setTimeout can be removed when #1420 is fixed.
2013-02-19 11:53:42 -05:00
Vladimir Agafonkin
8e176f48aa
Merge pull request #1419 from tmcw/test-jshint
...
Fix semicolons, breaking, whitespace, duplicate var statements.
2013-02-19 08:25:51 -08:00
Vladimir Agafonkin
aea0e3b05b
fix browser test runner, close #1418
2013-02-19 18:21:01 +02:00
Tom MacWright
0a2000166a
Fix semicolons, breaking, whitespace, duplicate var statements.
2013-02-19 11:18:15 -05:00
Vladimir Agafonkin
a0dd4a60e9
accept coordinates in form of simple objects, close #1412
2013-02-19 18:01:53 +02:00
Vladimir Agafonkin
5d41efe616
fix removeAttrubution, cover the control with tests, close #1410
2013-02-19 17:47:38 +02:00
Vladimir Agafonkin
d98b4ea035
throw meaningful exception on getCenter before setView, close #1395
2013-02-19 16:54:29 +02:00
Tom MacWright
eae5758ff4
Split template tests into logic groups, test for template without
...
tokens.
2013-02-15 17:38:11 -05:00
Mattias Bengtsson
3a834d35cd
Add tests for the zoomlevelschanged-event.
2013-02-14 03:07:32 +01:00
danzel
513c6ca4cd
Change _propagateEvent to be careful that it doesn't overwrite e.layer if it is already set. Allows markers to be in multiple FeatureGroups and have the events come through correctly. See the test for details.
...
Fixes Leaflet.markercluster#128 ( https://github.com/Leaflet/Leaflet.markercluster/issues/128 )
2013-02-08 14:44:28 +13:00
Vladimir Agafonkin
c327fa89ee
add a couple of DomUtil tests, #1347
2013-02-05 17:01:01 +02:00
Vladimir Agafonkin
f01e32d764
fix specs sometimes failing
2013-02-05 17:00:38 +02:00
Vladimir Agafonkin
5e05068478
complete LatLng and LatLngBounds tests, #1347
2013-02-05 15:21:40 +02:00