Skip to content

Commit

Permalink
v0.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulLeCam committed Jun 14, 2015
1 parent d77d762 commit 7fa2208
Show file tree
Hide file tree
Showing 10 changed files with 1,024 additions and 1,092 deletions.
8 changes: 8 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"optional": [
"es7.classProperties",
"es7.exportExtensions",
"es7.functionBind",
"es7.objectRestSpread"
]
}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v0.6.2 (14/06/15)

Fix ignored events in `MapComponent` ([#41](https://github.com/PaulLeCam/react-leaflet/pull/41)).

## v0.6.1 (22/05/15)

Fix `PopupContainer` export.
Expand Down
231 changes: 116 additions & 115 deletions example/build/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion example/build/dependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ process.nextTick = function (fun) {
}
}
queue.push(new Item(fun, args));
if (!draining) {
if (queue.length === 1 && !draining) {
setTimeout(drainQueue, 0);
}
};
Expand Down
1,837 changes: 876 additions & 961 deletions example/build/lib.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions example/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export default class EventsExample extends Component {
return <Map ref='map'
center={this.state.latlng}
zoom={13}
onClick={this.handleClick.bind(this)}
onLocationfound={this.handleLocationFound.bind(this)}
onClick={::this.handleClick}
onLocationfound={::this.handleLocationFound}
length={4}>
<TileLayer
url='http://{s}.tile.osm.org/{z}/{x}/{y}.png'
Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var source = require('vinyl-source-stream2');
var source = require('vinyl-source-stream');

var browserify = require('browserify');
var babelify = require('babelify');
Expand Down
8 changes: 6 additions & 2 deletions lib/MapComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ var _lodashCollectionReduce = require('lodash/collection/reduce');

var _lodashCollectionReduce2 = _interopRequireDefault(_lodashCollectionReduce);

var _lodashObjectKeys = require('lodash/object/keys');

var _lodashObjectKeys2 = _interopRequireDefault(_lodashObjectKeys);

var _react = require('react');

var EVENTS_RE = /on(?:Leaflet)?(.+)/i;
Expand All @@ -47,12 +51,12 @@ var MapComponent = (function (_Component) {
}, {
key: 'extractLeafletEvents',
value: function extractLeafletEvents(props) {
return (0, _lodashCollectionReduce2['default'])(props, function (res, cb, ev) {
return (0, _lodashCollectionReduce2['default'])((0, _lodashObjectKeys2['default'])(props), function (res, ev) {
if (EVENTS_RE.test(ev)) {
var key = ev.replace(EVENTS_RE, function (match, p) {
return p.toLowerCase();
});
res[key] = cb;
res[key] = props[ev];
}
return res;
}, {});
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "react-leaflet",
"version": "0.6.1",
"version": "0.6.2",
"description": "React components for Leaflet maps",
"main": "lib/index.js",
"scripts": {
"clean": "rm -Rf ./lib",
"compile": "npm run clean && babel --optional es7.objectRestSpread,es7.classProperties src --out-dir lib",
"watch": "babel --optional es7.objectRestSpread,es7.classProperties src --watch --out-dir lib",
"compile": "npm run clean && babel src --out-dir lib",
"watch": "babel src --watch --out-dir lib",
"test": "jest --coverage ./lib",
"start": "npm run compile && npm test",
"onchange": "onchange 'lib/*.js' 'lib/**/*.js' -- jest ./lib",
Expand Down Expand Up @@ -37,19 +37,19 @@
"react": "^0.13.0"
},
"devDependencies": {
"babel": "^5.4.7",
"babel": "^5.5.8",
"babelify": "^6.1.2",
"browserify": "^10.2.3",
"gulp": "^3.8.11",
"browserify": "^10.2.4",
"gulp": "^3.9.0",
"gulp-load-plugins": "^0.10.0",
"gulp-util": "^3.0.5",
"gulp-webserver": "^0.9.1",
"jest-cli": "^0.4.5",
"jest-cli": "^0.4.12",
"leaflet": "^0.7.3",
"onchange": "^1.1.0",
"react": "^0.13.3",
"vinyl-source-stream2": "^0.1.1",
"watchify": "^3.2.1"
"vinyl-source-stream": "^1.1.0",
"watchify": "^3.2.2"
},
"jest": {
"unmockedModulePathPatterns": [
Expand Down
2 changes: 1 addition & 1 deletion src/MapComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default class MapComponent extends Component {
return reduce(keys(props), (res, ev) => {
if (EVENTS_RE.test(ev)) {
const key = ev.replace(EVENTS_RE, (match, p) => p.toLowerCase());
res[ key ] = props[ev];
res[ key ] = props[ ev ];
}
return res;
}, {});
Expand Down

0 comments on commit 7fa2208

Please sign in to comment.