Skip to content

Commit

Permalink
fix(grunt): Simplified grunt tasks and development cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
tombatossals committed Nov 4, 2015
1 parent 23977e9 commit c43049e
Show file tree
Hide file tree
Showing 34 changed files with 303 additions and 7,003 deletions.
3 changes: 3 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
module.exports = function (grunt) {

require('load-grunt-config')(grunt);
grunt.config('pkg', grunt.file.readJSON('package.json'));

};
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
Library. This software aims to easily embed maps managed by Leaflet on your project.

### [tombatossals/angular-leaflet-directive](http://github.com/tombatossals/angular-leaflet-directive)
This is my personal project, which has been coded by me helped by many people for some years. I continue evolving it frequently, but if you need enterprise support of it, sorry, I can't give you more support that my spare time allows me.
This is a personal project, which has been coded by me helped by many people for some years. I continue evolving it frequently, but if you need enterprise support of it, sorry, I can't give you more support that my spare time allows me. If you want to help it would be really appreciated, first of all, please, read the * [CONTRIBUTING documentation](https://github.com/tombatossals/angular-leaflet-directive/blob/master/CONTRIBUTING.md)


[![Build Status](https://travis-ci.org/tombatossals/angular-leaflet-directive.png?branch=master)](https://travis-ci.org/tombatossals/angular-leaflet-directive) [![Dependencies](https://david-dm.org/tombatossals/angular-leaflet-directive.svg)](https://david-dm.org/tombatossals/angular-leaflet-directive) 
[![Dependencies](https://david-dm.org/tombatossals/angular-leaflet-directive/dev-status.svg)](https://david-dm.org/tombatossals/angular-leaflet-directive) [![Coverage
Expand Down
26 changes: 21 additions & 5 deletions dist/angular-leaflet-directive.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* angular-leaflet-directive 0.9.0 2015-10-12
* angular-leaflet-directive 0.9.1 2015-11-04
* angular-leaflet-directive - An AngularJS directive to easily interact with Leaflet maps
* git: https://github.com/tombatossals/angular-leaflet-directive
*/
Expand Down Expand Up @@ -2578,6 +2578,10 @@ angular.module("leaflet-directive").service('leafletMarkersHelpers', ["$rootScop
marker.unbindPopup();
if (isString(markerData.message)) {
marker.bindPopup(markerData.message, markerData.popupOptions);
// if marker has been already focused, reopen popup
if (map.hasLayer(marker) && markerData.focus === true) {
marker.openPopup();
}
}
}

Expand Down Expand Up @@ -4793,7 +4797,7 @@ angular.module("leaflet-directive").directive('tiles', ["leafletLogger", "leafle
controller.getMap().then(function(map) {
var defaults = leafletMapDefaults.getDefaults(attrs.id);
var tileLayerObj;
leafletScope.$watch("tiles", function(tiles) {
leafletScope.$watch("tiles", function(tiles, oldtiles) {
var tileLayerOptions = defaults.tileLayerOptions;
var tileLayerUrl = defaults.tileLayer;

Expand All @@ -4813,19 +4817,31 @@ angular.module("leaflet-directive").directive('tiles', ["leafletLogger", "leafle
tileLayerUrl = tiles.url;
}

tileLayerObj = L.tileLayer(tileLayerUrl, tileLayerOptions);
if (tiles.type === 'wms') {
tileLayerObj = L.tileLayer.wms(tileLayerUrl, tileLayerOptions);
} else {
tileLayerObj = L.tileLayer(tileLayerUrl, tileLayerOptions);
}

tileLayerObj.addTo(map);
leafletData.setTiles(tileLayerObj, attrs.id);
return;
}

// If the options of the tilelayer is changed, we need to redraw the layer
if (isDefined(tiles.url) && isDefined(tiles.options) && !angular.equals(tiles.options, tileLayerOptions)) {
if (isDefined(tiles.url) && isDefined(tiles.options) &&
(tiles.type !== oldtiles.type || !angular.equals(tiles.options, tileLayerOptions))) {
map.removeLayer(tileLayerObj);
tileLayerOptions = defaults.tileLayerOptions;
angular.copy(tiles.options, tileLayerOptions);
tileLayerUrl = tiles.url;
tileLayerObj = L.tileLayer(tileLayerUrl, tileLayerOptions);

if (tiles.type === 'wms') {
tileLayerObj = L.tileLayer.wms(tileLayerUrl, tileLayerOptions);
} else {
tileLayerObj = L.tileLayer(tileLayerUrl, tileLayerOptions);
}

tileLayerObj.addTo(map);
leafletData.setTiles(tileLayerObj, attrs.id);
return;
Expand Down
8 changes: 5 additions & 3 deletions dist/angular-leaflet-directive.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit c43049e

Please sign in to comment.