Fixed attributions disappearing, closed #405

This commit is contained in:
mourner 2012-02-13 13:12:36 +02:00
parent 0ef3058512
commit 2ebbfdf40c

View File

@ -28,7 +28,10 @@ L.Control.Attribution = L.Class.extend({
if (!text) { if (!text) {
return; return;
} }
this._attributions[text] = true; if (!this._attributions[text]) {
this._attributions[text] = 0;
}
this._attributions[text]++;
this._update(); this._update();
}, },
@ -36,7 +39,7 @@ L.Control.Attribution = L.Class.extend({
if (!text) { if (!text) {
return; return;
} }
delete this._attributions[text]; this._attributions[text]--;
this._update(); this._update();
}, },