mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
chain the container click handler
This commit is contained in:
parent
84a47746a8
commit
fd568ee18e
1 changed files with 3 additions and 2 deletions
|
@ -179,11 +179,12 @@ define(function (require) {
|
|||
position: 'topleft'
|
||||
},
|
||||
onAdd: function (map) {
|
||||
$(fitContainer).html('<a class="fa fa-crop" href="#" title="Fit Data Bounds"></a>');
|
||||
$(fitContainer).on('click', function (e) {
|
||||
$(fitContainer).html('<a class="fa fa-crop" href="#" title="Fit Data Bounds"></a>')
|
||||
.on('click', function (e) {
|
||||
e.preventDefault();
|
||||
self.fitBounds(map, mapData.features);
|
||||
});
|
||||
|
||||
return fitContainer;
|
||||
},
|
||||
onRemove: function (map) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue