Skip to content

Commit

Permalink
Prepare first release
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMufflon committed Feb 20, 2014
1 parent b929d6d commit 74bc046
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 41 deletions.
4 changes: 2 additions & 2 deletions dist/Leaflet.Elevation-0.0.1.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 32 additions & 2 deletions dist/Leaflet.Elevation-0.0.1.src.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,12 @@ L.Control.Elevation = L.Control.extend({
},

_updateAxis: function() {
this._xaxisgraphicnode.selectAll("axis").remove();
this._yaxisgraphicnode.selectAll("axis").remove();
this._xaxisgraphicnode.selectAll("g").remove();
this._xaxisgraphicnode.selectAll("path").remove();
this._xaxisgraphicnode.selectAll("text").remove();
this._yaxisgraphicnode.selectAll("g").remove();
this._yaxisgraphicnode.selectAll("path").remove();
this._yaxisgraphicnode.selectAll("text").remove();
this._appendXaxis(this._xaxisgraphicnode);
this._appendYaxis(this._yaxisgraphicnode);
},
Expand Down Expand Up @@ -440,6 +444,32 @@ L.Control.Elevation = L.Control.extend({
.attr("d", this._area);
this._updateAxis();
return;
},

/*
* Reset data
*/
_clearData: function() {
this._data = null;
this._dist = null;
this._maxElevation = null;
},

/*
* Reset data and display
*/
clear: function() {

this._clearData();

// workaround for 'Error: Problem parsing d=""' in Webkit when empty data
// https://groups.google.com/d/msg/d3-js/7rFxpXKXFhI/HzIO_NPeDuMJ
//this._areapath.datum(this._data).attr("d", this._area);
this._areapath.attr("d", "M0 0");

this._x.domain([0,1]);
this._y.domain([0,1]);
this._updateAxis();
}

});
Expand Down
Binary file modified dist/images/elevation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
74 changes: 37 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
{
"name": "Leaflet.Elevation",
"version": "0.0.1",
"description": "A Leaflet plugin to view GeoJSON height profiles",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-uglify": "~0.2.4",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-cssmin": "~0.6.2",
"grunt-contrib-jasmine": "~0.5.2",
"jasmine": "~1.3.1",
"grunt-contrib-connect": "~0.5.0",
"grunt-contrib-jshint": "~0.7.0",
"grunt-contrib-less": "~0.8.1",
"grunt-svg2png": "~0.2.1"
},
"dependencies": {
"leaflet": "~0.6",
"d3": "~3.1"
},
"repository": {
"type": "git",
"url": "https://github.com/MrMufflon/Leaflet.Elevation.git"
},
"keywords": [
"gis",
"heightprofile",
"leaflet",
"map",
"sdi"
],
"author": "Felix Bache",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/MrMufflon/Leaflet.Elevation/issues"
}
}
"name": "Leaflet.Elevation",
"version": "0.0.1",
"description": "A Leaflet plugin to view GeoJSON height profiles",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-uglify": "~0.2.4",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-cssmin": "~0.6.2",
"grunt-contrib-jasmine": "~0.5.2",
"jasmine": "~1.3.1",
"grunt-contrib-connect": "~0.5.0",
"grunt-contrib-jshint": "~0.7.0",
"grunt-contrib-less": "~0.8.1",
"grunt-svg2png": "~0.2.1"
},
"dependencies": {
"leaflet": "~0.6",
"d3": "~3.1"
},
"repository": {
"type": "git",
"url": "https://github.com/MrMufflon/Leaflet.Elevation.git"
},
"keywords": [
"gis",
"heightprofile",
"leaflet",
"map",
"sdi"
],
"author": "Felix Bache",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/MrMufflon/Leaflet.Elevation/issues"
}
}
1 change: 1 addition & 0 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ npm install grunt-contrib-jshint --save-dev
npm install grunt-contrib-less --save-dev
npm install grunt-contrib-jasmine --save-dev
npm install grunt-contrib-connect --save-dev
npm install grunt-svg2png --save-dev

0 comments on commit 74bc046

Please sign in to comment.