Fixed attributions disappearing, closed #405
This commit is contained in:
parent
0ef3058512
commit
2ebbfdf40c
@ -28,7 +28,10 @@ L.Control.Attribution = L.Class.extend({
|
||||
if (!text) {
|
||||
return;
|
||||
}
|
||||
this._attributions[text] = true;
|
||||
if (!this._attributions[text]) {
|
||||
this._attributions[text] = 0;
|
||||
}
|
||||
this._attributions[text]++;
|
||||
this._update();
|
||||
},
|
||||
|
||||
@ -36,7 +39,7 @@ L.Control.Attribution = L.Class.extend({
|
||||
if (!text) {
|
||||
return;
|
||||
}
|
||||
delete this._attributions[text];
|
||||
this._attributions[text]--;
|
||||
this._update();
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user