[Pkg-javascript-commits] [leaflet-markercluster] 145/479: Update leaflet with master + https://github.com/danzel/Leaflet/tree/oldie-fixes

Jonas Smedegaard dr at jones.dk
Thu Oct 16 16:00:22 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository leaflet-markercluster.

commit af61861f07e77fb13189e0f95523871622e9d7ec
Author: danzel <danzel at localhost.geek.nz>
Date:   Thu Aug 2 11:37:42 2012 +1200

    Update leaflet with master + https://github.com/danzel/Leaflet/tree/oldie-fixes
---
 lib/leaflet-dist/leaflet-src.js | 37 ++++++++++++++++++++++++++++---------
 lib/leaflet-dist/leaflet.js     |  2 +-
 2 files changed, 29 insertions(+), 10 deletions(-)

diff --git a/lib/leaflet-dist/leaflet-src.js b/lib/leaflet-dist/leaflet-src.js
index f8387c7..adc2a2c 100644
--- a/lib/leaflet-dist/leaflet-src.js
+++ b/lib/leaflet-dist/leaflet-src.js
@@ -21,7 +21,7 @@ if (typeof exports !== undefined + '') {
 	window.L = L;
 }
 
-L.version = '0.4.1';
+L.version = '0.4.2';
 
 
 /*
@@ -756,7 +756,7 @@ L.DomUtil = {
 			value = Math.round(value * 100);
 
 			if (filter) {
-				filter.Enabled = (value === 100);
+				filter.Enabled = (value !== 100);
 				filter.Opacity = value;
 			} else {
 				el.style.filter += ' progid:' + filterName + '(opacity=' + value + ')';
@@ -6932,16 +6932,35 @@ L.Control.Layers = L.Control.extend({
 		this._separator.style.display = (overlaysPresent && baseLayersPresent ? '' : 'none');
 	},
 
-	_addItem: function (obj, onclick) {
-		var label = document.createElement('label');
+	// IE7 bugs out if you create a radio dynamically, so you have to do it this hacky way (see http://bit.ly/PqYLBe)
+	_createRadioElement: function (name, checked) {
 
-		var input = document.createElement('input');
-		if (!obj.overlay) {
-			input.name = 'leaflet-base-layers';
+		var radioHtml = '<input type="radio" name="' + name + '"';
+		if (checked) {
+			radioHtml += ' checked="checked"';
 		}
-		input.type = obj.overlay ? 'checkbox' : 'radio';
+		radioHtml += '/>';
+
+		var radioFragment = document.createElement('div');
+		radioFragment.innerHTML = radioHtml;
+
+		return radioFragment.firstChild;
+	},
+
+	_addItem: function (obj) {
+		var label = document.createElement('label'),
+		    input,
+		    checked = this._map.hasLayer(obj.layer);
+
+		if (obj.overlay) {
+			input = document.createElement('input');
+			input.type = 'checkbox';
+			input.defaultChecked = checked;
+		} else {
+			input = this._createRadioElement('leaflet-base-layers', checked);
+		}
+
 		input.layerId = L.Util.stamp(obj.layer);
-		input.defaultChecked = this._map.hasLayer(obj.layer);
 
 		L.DomEvent.on(input, 'click', this._onInputClick, this);
 
diff --git a/lib/leaflet-dist/leaflet.js b/lib/leaflet-dist/leaflet.js
index b4f55f3..c334ffd 100644
--- a/lib/leaflet-dist/leaflet.js
+++ b/lib/leaflet-dist/leaflet.js
@@ -3,4 +3,4 @@
  Leaflet is an open-source JavaScript library for mobile-friendly interactive maps.
  http://leaflet.cloudmade.com
 */
-(function(e,t){var n,r;typeof exports!=t+""?n=exports:(r=e.L,n={},n.noConflict=function(){return e.L=r,this},e.L=n),n.version="0.4.1",n.Util={extend:function(e){var t=Array.prototype.slice.call(arguments,1);for(var n=0,r=t.length,i;n<r;n++){i=t[n]||{};for(var s in i)i.hasOwnProperty(s)&&(e[s]=i[s])}return e},bind:function(e,t){var n=arguments.length>2?Array.prototype.slice.call(arguments,2):null;return function(){return e.apply(t,n||arguments)}},stamp:function(){var e=0,t="_leaflet_id";r [...]
\ No newline at end of file
+(function(e,t){var n,r;typeof exports!=t+""?n=exports:(r=e.L,n={},n.noConflict=function(){return e.L=r,this},e.L=n),n.version="0.4.2",n.Util={extend:function(e){var t=Array.prototype.slice.call(arguments,1);for(var n=0,r=t.length,i;n<r;n++){i=t[n]||{};for(var s in i)i.hasOwnProperty(s)&&(e[s]=i[s])}return e},bind:function(e,t){var n=arguments.length>2?Array.prototype.slice.call(arguments,2):null;return function(){return e.apply(t,n||arguments)}},stamp:function(){var e=0,t="_leaflet_id";r [...]
\ No newline at end of file

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet-markercluster.git



More information about the Pkg-javascript-commits mailing list