Commit Graph

86 Commits

Author SHA1 Message Date
Vladimir Agafonkin
80607c6044 reimplement max bounds with proper zooming 2013-11-14 17:45:47 +02:00
Vladimir Agafonkin
be42f7a3b6 Merge branch 'patch-1' of https://github.com/kapouer/Leaflet into maxbounds
* 'patch-1' of https://github.com/kapouer/Leaflet:
  test Map#setMaxBounds and Map#panInsideBounds
  panInsideBounds: fit or center, pass options, remove boundsMinZoom
2013-11-14 14:13:45 +02:00
Vladimir Agafonkin
977fb99b6a fix specs after messy merge 2013-11-13 21:56:48 +02:00
Vladimir Agafonkin
3618f404f5 Merge branch 'invalidateSize' 2013-11-13 21:50:02 +02:00
John Firebaugh
33263e537d Add debounceMoveend option to invalidateSize 2013-11-13 10:53:34 -08:00
Vladimir Agafonkin
91c039b7aa jshinting and major clean up of specs code, ref #2151 2013-11-07 23:54:33 +02:00
Jérémy Lal
d7bf010f0b test Map#setMaxBounds and Map#panInsideBounds 2013-10-14 15:27:11 +02:00
Vladimir Agafonkin
2250cee6ec allow setZoom before setView, make setView zoom optional, close #2056, close #1449 2013-09-30 15:00:46 +03: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
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
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
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
Tom MacWright
a2f7d7e834 Use mocha 2013-04-03 14:50:09 -07: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
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
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
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
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
Tom MacWright
0a2000166a Fix semicolons, breaking, whitespace, duplicate var statements. 2013-02-19 11:18:15 -05:00
Vladimir Agafonkin
d98b4ea035 throw meaningful exception on getCenter before setView, close #1395 2013-02-19 16:54:29 +02:00
Mattias Bengtsson
3a834d35cd Add tests for the zoomlevelschanged-event. 2013-02-14 03:07:32 +01:00
Mattias Bengtsson
5fa8dfa5a5 Add test for ensuring maxZoom and minZoom on the map overrides any layer settings. 2012-12-12 00:45:19 +01:00
Mattias Bengtsson
e475c04eaa Add a missing semi colon and make one line < 80 chars 2012-12-12 00:45:09 +01:00
John Firebaugh
0b4d2b0c44 Add Map#whenReady
Fixes #1063
2012-10-12 12:54:13 -07:00
John Firebaugh
fbf91fef54 Ensure that getBounds can be called during the first moveend event
Fixes #1027
2012-10-04 14:02:46 -07:00
mourner
2b8d9eed1d LatLngBounds, moved MapSpec 2010-09-21 11:46:31 +03:00