Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master upstream #2

Open
wants to merge 90 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
dfa60b5
Merge pull request #2259 from danzel/fix2256
mourner Dec 3, 2013
504f1f2
update changelog [skip ci]
mourner Dec 3, 2013
440f2f8
bump version to 0.7.1
mourner Dec 3, 2013
bda5ce1
A transitionEnd event only finished a zoom animation if it is for a t…
danzel Dec 6, 2013
bd5fbd2
update changelog [skip ci]
mourner Dec 6, 2013
c480c5c
Use _getTileSize() instead of using options.tileSize directly
perliedman Dec 20, 2013
a88ab70
Merge pull request #2321 from perliedman/tms-fix-maxNativeZoom
mourner Dec 22, 2013
87757d5
fix rounding bug with unconventional tile sizes, close #2288
mourner Dec 23, 2013
950034e
fix scrolled page mouse events in Chrome 32, close #2352
mourner Dec 24, 2013
327f07d
bump version to 0.7.2
mourner Dec 23, 2013
bcf370b
update stable branch changelog for 0.7.2 [skip ci]
mourner Jan 17, 2014
9cd4f1b
Don't set _animatingZoom for touchZoom zooming. refs #1934
danzel Jan 21, 2014
c2c3706
Merge pull request #2400 from Leaflet/stable-1934b
mourner Jan 23, 2014
c6d3607
Trigger remove when removing canvas layers
adimitrov Feb 24, 2014
2e7601b
Merge pull request #2486 from adimitrov/patch-2
mourner Feb 24, 2014
0e558ad
fire viewreset before onAdd, fix #2510
mourner Mar 5, 2014
6864384
fix travis uploads in stable branch too
mourner Mar 20, 2014
59a8c00
correctly remove event listener for layer control
jack-kerouac Mar 21, 2014
7fe7f57
Merge pull request #2569 from jack-kerouac/patch-1
mourner Mar 21, 2014
0317a73
Backported 9a2399ee500cfa24efd320e44c68ebf1c4109d78
perliedman Apr 15, 2014
974dcb8
Added test case for setView immediately after map is initialized
perliedman Apr 15, 2014
ce7a753
Remove duplicate requestAnimFrame.
perliedman Apr 15, 2014
da3fb65
Merge pull request #2636 from perliedman/backport-freeze-fix-2521
mourner Apr 18, 2014
4b9f5f4
make Android double-click issue threshold smaller, close #2303
mourner Dec 25, 2013
79d4e4e
Merge branch 'stable' of https://github.com/Leaflet/Leaflet into stable
mourner Apr 28, 2014
2d911c2
backport #2503 fix false-positive drag on tap
mourner Apr 28, 2014
1335c77
fix error dragging outside of window in FF, close #2610
mourner Apr 28, 2014
a442bb3
fix build
mourner Apr 28, 2014
964716c
update changelog with 0.7.3 fixes
mourner May 23, 2014
8acccd8
bump version
mourner May 23, 2014
600b90b
add bower support
calvinmetcalf Mar 19, 2014
c64f31a
build script fixes
mourner May 23, 2014
0cff05a
update changelog
mourner May 23, 2014
bac0884
update publish script
mourner May 23, 2014
25db37b
bump version
mourner May 23, 2014
2812151
enforce maxZoom before applying paddingOffset, fixes #2489
bsstoner Feb 26, 2014
c759481
Prevent race condition with marker position and zoom animation
perliedman Jan 18, 2015
61c39eb
+ missing lineCap and lineJoin options for Path.Canvas.
northerneyes Jan 20, 2015
5a95425
Merge pull request #3156 from northerneyes/stable
mourner Jan 22, 2015
69801c3
Merge pull request #3152 from perliedman/fix-marker-zoom-race
mourner Jan 22, 2015
8849980
switch to OSM on the debug page
mourner Jan 28, 2015
94b63b4
TileLayer - Use correct tileSize when checking tile bounds
jlaxson Apr 30, 2015
4bdd049
Merge pull request #3415 from jlaxson/tile-max-native-zoom-bounds
mourner Apr 30, 2015
7986d00
Backport #2726 to stable
IvanSanchez May 8, 2015
6b90011
Merge pull request #3448 from IvanSanchez/stable-bower
mourner May 8, 2015
ec0b5ee
Canvas path holes fillRule fix
w8r May 18, 2015
6feb4ab
Merge pull request #3477 from w8r/stable
IvanSanchez May 18, 2015
3cec7fc
Implement contextclick and dblclick for canvas paths, fixes #3481
IvanSanchez May 20, 2015
07aee81
Merge pull request #3482 from Leaflet/stable-canvas-contextmenu
mourner May 20, 2015
f3dca3b
Update outdated cloudmade tiles with OSM.
IvanSanchez May 20, 2015
981ee47
Backport master's L.Browser.touch, fixes #3466
IvanSanchez Jun 8, 2015
8f02433
Merge pull request #3520 from Leaflet/stable-emulated-touch
mourner Jun 8, 2015
8eb11d7
set Popup source to marker when bindPopup gets an instance of L.Popup
Jul 27, 2015
47cc2a5
Merge pull request #3675 from Intermaps/marker-popup-fix
mourner Jul 27, 2015
610993f
Backport L.Browser.mspointer detection from #3674
IvanSanchez Aug 4, 2015
4422602
Merge pull request #3710 from Leaflet/stable-mspointer
mourner Aug 5, 2015
55d3e7d
Clear tilelayer's BG buffer on zoomanim end if out of zoom limits
IvanSanchez Aug 26, 2015
622f0ea
Merge pull request #3778 from Leaflet/stable-tilezoomlimits
mourner Aug 26, 2015
10b1ff5
v0.7.4: changelog, version bump
IvanSanchez Aug 26, 2015
9147758
work around a transitionend Chrome bug, close #3689
mourner Aug 26, 2015
0d95c31
fix build
mourner Aug 28, 2015
a0e04da
Merge pull request #3779 from Leaflet/stable-0.7.4-changelog
mourner Aug 28, 2015
bb925b4
update changelog
mourner Aug 31, 2015
19c295e
revert c759481 (fixed elsewhere), close #3796
mourner Sep 2, 2015
4b289ab
Backport of pointer fixes in #3839
danzel Sep 14, 2015
a51c0c7
Issue #3829 - Removed Path with mouseout throws error
Sep 15, 2015
4a6675e
Merge pull request #3849 from sambernet/3829-avoid-mouseout-event-on-…
mourner Sep 17, 2015
b7241d7
Merge pull request #3842 from danzel/stable-3804
mourner Sep 17, 2015
5e3bab2
Fix touch drag in Edge browser
neorth Sep 18, 2015
3dd6ee7
Merge pull request #3853 from Neorth/patch-1
mourner Sep 18, 2015
0532055
Fixed FeatureGroup crash
Lambdac0re Sep 25, 2015
e0fce81
Merge pull request #3869 from Lambdac0re/patch-1
mourner Sep 25, 2015
3e200be
horrible hack that could fix a tile loading race condition in iOS
mourner Sep 24, 2015
787e600
bump version to v0.7.6
mourner Oct 26, 2015
727c4fb
update changelog for 0.7.6
mourner Oct 26, 2015
8032c24
port new release config from master
mourner Oct 26, 2015
c3ade05
fox publish script
mourner Oct 26, 2015
b7a77d1
update deps
mourner Oct 26, 2015
91d96d7
update karma code
mourner Oct 26, 2015
be67b48
bump to 0.7.7 :(
mourner Oct 26, 2015
197f9d4
v0.7.7
mourner Oct 26, 2015
21b1f9a
Run tests in SlimerJS also.
IvanSanchez Feb 5, 2016
e8e6dae
Do not kill SlimerJS when running unit tests on win32
IvanSanchez Feb 10, 2016
dcd7c63
Fix undefined map dragging bug on mobile
yangshun Apr 25, 2016
98bec86
npmpublish
Nov 14, 2019
e099b8f
Merge remote-tracking branch 'origin/0.7.8'
Nov 27, 2019
232c63b
Merge branch master into BranchMergeIntoNpm
Nov 28, 2019
4277337
Merge branch master into master-upstream
Nov 28, 2019
cf6a67d
conflicts json file
Nov 28, 2019
f6cfc9c
Merge branch 'pr/4' into pr/2
Jan 25, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Node.js Package

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm ci
- run: npm test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

publish-gpr:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
scope: '@your-github-username'
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
8 changes: 3 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,6 @@ Animation code in Leaflet had undergone a major rewrite (main PR: [#2382](https:

Note tha we skipped 0.7.6 version for which we accidentally published a broken build to NPM.


## 0.7.5 (September 2, 2015)

* Fixed a regression that broke animation in Leaflet.markercluster. [#3796](https://github.com/Leaflet/Leaflet/issues/3796)
Expand All @@ -422,7 +421,7 @@ Note tha we skipped 0.7.6 version for which we accidentally published a broken b
* Fixed a bug where tile layers were not respecting their `minZoom` or `maxZoom` options (by [@ivansanchez](https://github.com/ivansanchez)) [#3778](https://github.com/Leaflet/Leaflet/pull/3778)
* Improved detection of touch-capable web browsers, in particular fixing touch interactions in device emulation mode in Chrome and Firefox (by [@ivansanchez](https://github.com/ivansanchez)) [#3520](https://github.com/Leaflet/Leaflet/pull/3520) [#3710](https://github.com/Leaflet/Leaflet/pull/3710)
* Fixed a bug where tile layers with `maxNativeZoom` were not checking bounds properly (by [@jlaxon](https://github.com/jlaxon)) [#3415](https://github.com/Leaflet/Leaflet/pull/3152)
* Fixed a bug where popups were not remembering which layer originated them after calling `bindPopup(popup)` (by [@Eschon](https://github.com/Eschon)) [#3675](https://github.com/Leaflet/Leaflet/pull/3675)
* Fixed a bug where popups were not remembering which layer originated them after calling `bindPopup(popup)` (by [@Eschon](https://github.com/Eschon)) [#3675](https://github.com/Leaflet/Leaflet/pull/3765)
* Fixed a race condition between markers and zoom animation (by [@perliedman](https://github.com/perliedman)) [#3152](https://github.com/Leaflet/Leaflet/pull/3152)
* Fixed a bug with `Map.fitBounds` padding (by [@bsstoner](https://github.com/bsstoner)). [#2489](https://github.com/Leaflet/Leaflet/issues/2489)
* Allow canvas paths to fire `dblclick` and `contextmenu` events (by [@ivansanchez](https://github.com/ivansanchez)) [#3482](https://github.com/Leaflet/Leaflet/pull/3482)
Expand All @@ -436,15 +435,14 @@ Note tha we skipped 0.7.6 version for which we accidentally published a broken b
* Added proper **bower** and **component** support (by [@calvinmetcalf](https://github.com/calvinmetcalf)). [#2561](https://github.com/Leaflet/Leaflet/pull/2561) [#1903](https://github.com/Leaflet/Leaflet/issues/1903)
* Fixed a bug where dragging the map outside the window caused an error on FF. [#2610](https://github.com/Leaflet/Leaflet/issues/2610)
* Fixed a bug where some taps on Android where not working, often falsely perceived as drags (by [@axefrog](https://github.com/axefrog)). [#2503](https://github.com/Leaflet/Leaflet/pull/2503)
* Fixed a bug where clicks on Android were skipped when happened too fast. [#2303](https://github.com/Leaflet/Leaflet/issues/2303)
* Fixed a bug where tapping too quickly on Android ignored most taps. [#2303](https://github.com/Leaflet/Leaflet/issues/2303)
* Fixed a bug where calling `setView` (or similar methods) several times in succession could freeze the map. [#2521](https://github.com/Leaflet/Leaflet/issues/2521) [#2236](https://github.com/Leaflet/Leaflet/issues/2236) [#2485](https://github.com/Leaflet/Leaflet/issues/2485)
* Fixed a bug where `Control.Layers` wasn't properly removed (by [@jack-kerouac](https://github.com/jack-kerouac)). [#2569](https://github.com/Leaflet/Leaflet/pull/2569)
* Fixed a bug that caused `TileLayer` `load` event not to fire properly. [#2510](https://github.com/Leaflet/Leaflet/issues/2510)
* Fixed Canvas-based paths not triggering `remove` event when removed (by @adimitrov). [#2486](https://github.com/Leaflet/Leaflet/pull/2486)
* Fixed a bug where you could end up with fractional zoom after pinch-zooming in some cases (by [@danzel](https://github.com/danzel). [#2400](https://github.com/Leaflet/Leaflet/pull/2400) [#1943](https://github.com/Leaflet/Leaflet/issues/1934)


## 0.7.2 (January 17, 2014)
## 0.7.2 (January 17, 2013)

* Fixed a bug that appeared with **Chrome 32 update** that made all **mouse events shifted on scrolled pages**. [#2352](https://github.com/Leaflet/Leaflet/issues/2352)
* Fixed a bug that could break tile loading when using non-standard tile sizes. [#2288](https://github.com/Leaflet/Leaflet/issues/2288)
Expand Down
11 changes: 7 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,17 @@ Happy coding!

## Running the Tests

To run the tests from the command line,
install [PhantomJS](http://phantomjs.org/) (and make sure it's in your `PATH`),
then run:
To run the tests from the command line, first make sure you have installed all
the build system requirements with `npm install`. Then, simply run:

```
jake test
npm test
```

By default, the tests will run in [PhantomJS](http://phantomjs.org/), and also
in [SlimerJS](https://slimerjs.org/) if possible. If `npm test` complains about
PhantomJS, install it manually and make sure it's in your `PATH`.

To run all the tests in actual browsers at the same time, you can do:

```
Expand Down
10 changes: 8 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
{
"name": "leaflet",
"version": "0.7.8",
"description": "JavaScript library for mobile-friendly interactive maps",
"main": [
"dist/leaflet.css",
"dist/leaflet-src.js"
"dist/leaflet-src.js",
"dist/images/layers-2x.png",
"dist/images/layers.png",
"dist/images/marker-icon-2x.png",
"dist/images/marker-icon.png",
"dist/images/marker-shadow.png"
],
"ignore": [
"ignore": [
".*",
"CHANGELOG.json",
"FAQ.md",
Expand Down
22 changes: 22 additions & 0 deletions build/bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "leaflet",
"description": "JavaScript library for mobile-friendly interactive maps",
"main": [
"dist/leaflet.css",
"dist/leaflet-src.js",
"dist/images/layers-2x.png",
"dist/images/layers.png",
"dist/images/marker-icon-2x.png",
"dist/images/marker-icon.png",
"dist/images/marker-shadow.png"
],
"ignore": [
".*",
"CHANGELOG.json",
"FAQ.md",
"debug",
"spec",
"src",
"build"
]
}
28 changes: 27 additions & 1 deletion build/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,22 @@ exports.build = function (callback, version, compsBase32, buildName) {

exports.test = function(complete, fail) {
var karma = require('karma'),
testConfig = {configFile : __dirname + '/../spec/karma.conf.js'};
testConfig = {configFile : __dirname + '/../spec/karma.conf.js'},
autoSlimer = false;

testConfig.browsers = ['PhantomJS'];

try {
var child = require('child_process').execFileSync(
require('slimerjs').path
);
console.log('Running tests with both PhantomJS and SlimerJS');
testConfig.browsers.push('SlimerJS');
autoSlimer = true;
} catch(e) {
console.log('Cannot start SlimerJS, will run tests only in PhantomJS');
}

function isArgv(optName) {
return process.argv.indexOf(optName) !== -1;
}
Expand Down Expand Up @@ -226,12 +238,26 @@ exports.test = function(complete, fail) {
console.log('Running tests...');

var server = new karma.Server(testConfig, function(exitCode) {

// Work around https://github.com/karma-runner/karma-slimerjs-launcher/issues/1
if (autoSlimer && require('os').platform() !== 'win32' ) { // Kill process only in linux/osx, as win32 seems to work fine
var slimerjsPids = require('child_process').execSync('ps -Af | grep slimerjs | grep xulrunner | awk \'{print $2}\'').toString();
slimerjsPids = slimerjsPids.trim().split('\n');
for (var i=0; i<slimerjsPids.length; i++) {
try {
var pid = Number(slimerjsPids[i]);
require('child_process').execSync('ps -A | grep ' + pid + ' && kill ' + pid);
} catch(e) {}
}
}

if (!exitCode) {
console.log('\tTests ran successfully.\n');
complete();
} else {
process.exit(exitCode);
}
});

server.start();
};
19 changes: 19 additions & 0 deletions build/component.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "leaflet",
"description": "JavaScript library for mobile-friendly interactive maps",
"scripts": [
"dist/leaflet.js",
"dist/leaflet-src.js"
],
"images":[
"dist/images/layers-2x.png",
"dist/images/layers.png",
"dist/images/marker-icon-2x.png",
"dist/images/marker-icon.png",
"dist/images/marker-shadow.png"
],
"styles":[
"dist/leaflet.css"
],
"main": "dist/leaflet-src.js"
}
8 changes: 6 additions & 2 deletions build/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ npm test || exit 1

git checkout -b build

jake build[,,true]
git add dist/leaflet-src.js dist/leaflet.js dist/leaflet-src.map -f
npm run build
git add dist/leaflet-src.js dist/leaflet.js -f

copyfiles -u 1 build/*.json ./
tin -v $VERSION
git add component.json bower.json -f

git commit -m "v$VERSION"

Expand Down
20 changes: 20 additions & 0 deletions component.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "leaflet",
"version": "0.7.8",
"description": "JavaScript library for mobile-friendly interactive maps",
"scripts": [
"dist/leaflet.js",
"dist/leaflet-src.js"
],
"images": [
"dist/images/layers-2x.png",
"dist/images/layers.png",
"dist/images/marker-icon-2x.png",
"dist/images/marker-icon.png",
"dist/images/marker-shadow.png"
],
"styles": [
"dist/leaflet.css"
],
"main": "dist/leaflet-src.js"
}
25 changes: 25 additions & 0 deletions debug/tests/setview_marker_setview.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

<link rel="stylesheet" href="../css/screen.css" />

<link rel="stylesheet" href="../../dist/leaflet.css" />
</head>
<body>
<div id="map" style=></div>
<script type="text/javascript" src="../../build/deps.js"></script>
<script src="../leaflet-include.js"></script>
<script>
map = L.map('map');
L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg').addTo(map);
map.setView([51.505, -0.09], 15);
L.circleMarker([51.5, -0.09], {}).addTo(map);
L.marker([51.505, -0.09]).addTo(map);
map.setZoom(14); //comment this to make it work
</script>
</body>
</html>
Loading