Skip to content

Commit

Permalink
fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickarlt committed Oct 15, 2014
2 parents 1e3a535 + 09ffc53 commit 2c7eda8
Show file tree
Hide file tree
Showing 35 changed files with 345 additions and 98 deletions.
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ These changes were targeted at removing any hardcoded projection-specific logic
* Fixed `ImageOverlay` mercator distortion on lower zoom levels.
* Fixed a bug where layers didn't fire `popupopen` and `popupclose` events when manually creating a popup object and passing it to `bindPopup`. [#2354](https://github.com/Leaflet/Leaflet/issues/2354)
* Fixed box-zoom overlay appearing under markers. [#1813](https://github.com/Leaflet/Leaflet/issues/1813)
* Fixed an issue where clicks on Android were skipped when happened too fast. [#2303](https://github.com/Leaflet/Leaflet/issues/2303)

### Misc improvements

Expand All @@ -143,6 +142,19 @@ These changes were targeted at removing any hardcoded projection-specific logic
* Added reference to Leaflet CSS in `package.json` (by [@bclinkinbeard](https://github.com/bclinkinbeard)). [#2432](https://github.com/Leaflet/Leaflet/pull/2432)


## 0.7.3 (May 23, 2014)

* 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 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)

* 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)
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ try asking [on the Leaflet forum](https://groups.google.com/forum/#!forum/leafle

### Considerations for Accepting Patches

While we happily accept patches, we're also commited to keeping Leaflet simple, lightweight and blazingly fast.
While we happily accept patches, we're also committed to keeping Leaflet simple, lightweight and blazingly fast.
So bugfixes, performance optimizations and small improvements that don't add a lot of code
are much more likely to get accepted quickly.

Expand All @@ -53,7 +53,7 @@ Before sending a pull request with a new feature, first check if it's been discu
or [Leaflet UserVoice](http://leaflet.uservoice.com/)),
and then ask yourself two questions:

1. Are you sure that this new feature is important enough to justify its presense in the Leaflet core?
1. Are you sure that this new feature is important enough to justify its presence in the Leaflet core?
Or will it look better as a plugin in a separate repository?
2. Is it written in a simple, concise way that doesn't add bulk to the codebase?

Expand Down Expand Up @@ -85,7 +85,7 @@ Please do not commit to the `master` branch, or your unrelated changes will go i
You should also follow the code style and whitespace conventions of the original codebase.
In particular, use tabs for indentation and spaces for alignment.

Before commiting your changes, run `jake lint` to catch any JS errors in the code and fix them.
Before committing your changes, run `jake lint` to catch any JS errors in the code and fix them.
If you add any new files to the Leaflet source, make sure to also add them to `build/deps.js`
so that the build system knows about them.

Expand Down Expand Up @@ -142,7 +142,7 @@ If you need to make edits in a local repository to see how it looks in the proce
4. Open `localhost:4000` in your browser.

Now any file changes will be updated when you reload pages automatically.
After commiting the changes, just send a pull request.
After committing the changes, just send a pull request.

If you need to update documentation according to a new feature that only appeared in the master version (not stable one),
you need to make changes to `gh-pages-master` branch instead of `gh-pages`.
Expand Down
6 changes: 3 additions & 3 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ You can roll your own tiles as well.
but there are providers that use other sources.

Check out [this example](http://leaflet-extras.github.io/leaflet-providers/preview/)
with half a hundred different layers to choose from.
with over seventy different layers to choose from.
Popular commercial options, free up to a particular number of requests, include
[MapBox](http://mapbox.com),
[Bing Maps](http://www.microsoft.com/maps/choose-your-binge's-maps-API.aspx) (using a [plugin](https://github.com/shramov/leaflet-plugins)),
[Bing Maps](http://www.microsoft.com/maps/choose-your-bing-maps-API.aspx) (using a [plugin](https://github.com/shramov/leaflet-plugins)),
[Esri ArcGIS](http://www.arcgis.com/features/maps/imagery.html) ([official plugin](https://github.com/Esri/esri-leaflet))
and [Nokia Here](http://developer.here.com/web-experiences).
A notable exception is [MapQuest Open](http://developer.mapquest.com/web/products/open/map), which is free for any number of requests.
Expand All @@ -45,7 +45,7 @@ and [MapQuest Open](http://developer.mapquest.com/web/products/open/map) provide

#### I want to use Google Maps API tiles with Leaflet, can I do that?

The problem with Google is that its [Terms of Use](https://developers.google.com/maps/terms?hl=ru) forbid any means of tile access other than through the Google Maps API.
The problem with Google is that its [Terms of Use](https://developers.google.com/maps/terms) forbid any means of tile access other than through the Google Maps API.

You can add the Google Maps API as a Leaflet layer with a [plugin](https://github.com/shramov/leaflet-plugins). But note that the map experience will not be perfect, because Leaflet will just act as a proxy to the Google Maps JS engine, so you won't get all the performance and usability benefits of using Leaflet when the Google layer is on.

Expand Down
8 changes: 5 additions & 3 deletions Jakefile.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function hint(msg, paths) {
console.log('\tCheck passed.\n');
complete();
});
}
};
}

desc('Check Leaflet source for errors with JSHint');
Expand All @@ -36,12 +36,14 @@ desc('Combine and compress Leaflet source files');
task('build', {async: true}, function (compsBase32, buildName) {
var v;

jake.exec('git log -1 --pretty=format:"%h"', {}, function () {
jake.exec('git log -1 --pretty=format:"%h"', {breakOnError: false}, function () {
build.build(complete, v, compsBase32, buildName);

}).on('stdout', function (data) {
v = version + ' (' + data.toString() + ')';
})
}).on('error', function () {
v = version;
});
});

desc('Run PhantomJS tests');
Expand Down
3 changes: 1 addition & 2 deletions build/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "leaflet",
"description": "JavaScript library for mobile-friendly interactive maps",
"main": [
"dist/leaflet.js",
"dist/leaflet.css",
"dist/leaflet-src.js",
"dist/images/layers-2x.png",
Expand All @@ -20,4 +19,4 @@
"src",
"build"
]
}
}
68 changes: 68 additions & 0 deletions debug/map/markers.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet debug page</title>

<link rel="stylesheet" href="../../dist/leaflet.css" />

<meta name="viewport" content="width=device-width, initial-scale=1.0">

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

<script type="text/javascript" src="../../build/deps.js"></script>
<script src="../leaflet-include.js"></script>
</head>
<body>

<div id="map"></div>

<script type="text/javascript">
map = L.map('map', { center: [0, 0], zoom: 3, maxZoom: 4 });

L.Icon.Default.imagePath = 'http://cdn.leafletjs.com/leaflet-0.7.3/images';


var markerStatic = new L.Marker([0, -10], {
draggable: false,
title: 'Static'
});

map.addLayer(markerStatic);
markerStatic.bindPopup("Static");


var markerDraggable = new L.Marker([0, 10], {
draggable: true,
title: 'Draggable'
});

map.addLayer(markerDraggable);
markerDraggable.bindPopup("Draggable");

var poly = new L.Polygon([[0, 10], [0, 15.5], [0, 50], [20, 20.5]]);
map.addLayer(poly);


markerDraggable.on('click', function(e) {
console.log('markerDraggable click');
});
markerStatic.on('click', function(e) {
console.log('markerStatic click');
})
map.on('click', function(e) {
console.log('map click');
});

poly.on('click', function(e) {
console.log('poly click');
});

L.tileLayer('http://{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png', {
attribution: "Map: Tiles Courtesy of MapQuest (OpenStreetMap, CC-BY-SA)",
subdomains: ["otile1","otile2","otile3","otile4"],
maxZoom: 12,
minZoom: 2
}).addTo(map);
</script>
</body>
</html>
2 changes: 1 addition & 1 deletion debug/tests/click_on_canvas.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
opacity: 1,
smoothFactor: 1,
color: 'red',
clickable:true
interactive:true
}));

polygons.on('click', function(m) {
Expand Down
2 changes: 1 addition & 1 deletion debug/tests/svg_clicks.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
[51, 7.000],
[51.002, 7.004]
],
{ clickable:false,color:'#f00' }
{ interactive:false,color:'#f00' }
).addTo(map);

// when the mouse hovers over the red route2, you cannot click through the blue route1 beneath
Expand Down
12 changes: 7 additions & 5 deletions dist/leaflet.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
-webkit-user-drag: none;
-webkit-user-drag: none;
}
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
.leaflet-safari .leaflet-tile {
Expand All @@ -40,7 +40,9 @@
.leaflet-marker-shadow {
display: block;
}
/* map is broken in FF if you have max-width: 100% on tiles */
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
.leaflet-container svg,
.leaflet-container img {
max-width: none !important;
}
Expand Down Expand Up @@ -171,23 +173,23 @@

/* cursors */

.leaflet-clickable {
.leaflet-interactive {
cursor: pointer;
}
.leaflet-container {
cursor: -webkit-grab;
cursor: -moz-grab;
}
.leaflet-crosshair,
.leaflet-crosshair .leaflet-clickable {
.leaflet-crosshair .leaflet-interactive {
cursor: crosshair;
}
.leaflet-popup-pane,
.leaflet-control {
cursor: auto;
}
.leaflet-dragging .leaflet-container,
.leaflet-dragging .leaflet-clickable {
.leaflet-dragging .leaflet-interactive {
cursor: move;
cursor: -webkit-grabbing;
cursor: -moz-grabbing;
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
"version": "0.7.0",
"description": "JavaScript library for mobile-friendly interactive maps",
"devDependencies": {
"jake": "~0.7.9",
"jshint": "~2.4.4",
"jake": "~0.7.14",
"jshint": "~2.5.1",
"uglify-js": "~2.4.13",
"mocha": "~1.17.1",
"mocha": "~1.19.0",
"happen": "~0.1.3",
"karma": "~0.12.0",
"karma-mocha": "~0.1.1",
"karma-coverage": "~0.2.0",
"karma-phantomjs-launcher": "^0.1.2",
"karma-chrome-launcher": "^0.1.2",
"tin": "^0.4.0",
"copyfiles": "0.0.1"
"karma": "~0.12.16",
"karma-mocha": "~0.1.3",
"karma-coverage": "~0.2.3",
"karma-phantomjs-launcher": "^0.1.4",
"karma-chrome-launcher": "^0.1.4",
"tin": "^0.5.0",
"copyfiles": "0.1.0"
},
"main": "dist/leaflet-src.js",
"style": "dist/leaflet.css",
Expand Down
1 change: 1 addition & 0 deletions spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta charset="utf-8">
<title>Leaflet Spec Runner</title>
<link rel="stylesheet" type="text/css" href="../node_modules/mocha/mocha.css">
<link rel="stylesheet" type="text/css" href="../dist/leaflet.css">
</head>
<body>
<div id="mocha"></div>
Expand Down
6 changes: 6 additions & 0 deletions spec/suites/geo/LatLngSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ describe('LatLng', function () {

expect(Math.abs(Math.round(a.distanceTo(b) / 1000) - 2084) < 5).to.eql(true);
});
it('does not return NaN if input points are equal', function () {
var a = new L.LatLng(50.5, 30.5);
var b = new L.LatLng(50.5, 30.5);

expect(a.distanceTo(b)).to.eql(0);
});
});

describe('L.latLng factory', function () {
Expand Down
Loading

0 comments on commit 2c7eda8

Please sign in to comment.