From 0cd810bbb13fc5cfd0372a430f5dc8244cdf0610 Mon Sep 17 00:00:00 2001 From: Mourner Date: Tue, 11 Jan 2011 17:01:49 +0200 Subject: [PATCH] overriding default options --- src/layer/Marker.js | 2 +- src/layer/Popup.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/layer/Marker.js b/src/layer/Marker.js index 28239985..77d7d5fb 100644 --- a/src/layer/Marker.js +++ b/src/layer/Marker.js @@ -8,7 +8,7 @@ L.Marker = L.Class.extend({ initialize: function(latlng, options) { this._latlng = latlng; - //TODO override default options + L.Util.extend(this.options, options); }, onAdd: function(map) { diff --git a/src/layer/Popup.js b/src/layer/Popup.js index 3887c949..ffc63ea3 100644 --- a/src/layer/Popup.js +++ b/src/layer/Popup.js @@ -8,8 +8,8 @@ L.Popup = L.Class.extend({ autoPanPadding: new L.Point(5, 5) }, - initialize: function() { - //TODO override default options + initialize: function(options) { + L.Util.extend(this.options, options); }, onAdd: function(map) { @@ -32,6 +32,7 @@ L.Popup = L.Class.extend({ this._adjustPan(); this._container.style.visibility = ''; + this._container.style.opacity = '1'; //TODO fix ugly opacity hack },