mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
update style of tooltip to match kibana tooltip
This commit is contained in:
parent
fd46874eac
commit
644eea5428
3 changed files with 42 additions and 7 deletions
|
@ -19,8 +19,8 @@ define(function (require) {
|
|||
value: feature.properties.count
|
||||
};
|
||||
var location = {
|
||||
label: 'Center',
|
||||
value: lat.toFixed(4) + ', ' + lng.toFixed(4)
|
||||
label: 'Geohash center',
|
||||
value: lat.toFixed(3) + ', ' + lng.toFixed(3)
|
||||
};
|
||||
|
||||
details.push(metric, location);
|
||||
|
|
|
@ -79,16 +79,52 @@
|
|||
}
|
||||
|
||||
.leaflet-popup-content-wrapper {
|
||||
background: rgba(70, 82, 93, 0.95) !important;
|
||||
color: @gray-lighter !important;
|
||||
background: @tooltip-bg !important;
|
||||
color: @tooltip-color !important;
|
||||
border-radius: 4px !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.leaflet-popup-content {
|
||||
padding: 8px !important;
|
||||
margin: 0 !important;
|
||||
line-height: 14px !important;
|
||||
line-height: 1.1 !important;
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
word-wrap: break-word;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
|
||||
> :last-child {
|
||||
margin-bottom: @tooltip-space;
|
||||
}
|
||||
|
||||
> * {
|
||||
margin: @tooltip-space @tooltip-space 0;
|
||||
}
|
||||
|
||||
table {
|
||||
td,th {
|
||||
padding: @tooltip-space-tight;
|
||||
|
||||
&.row-bucket {
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
|
||||
// if there is a header, give it a border that matches
|
||||
// those in the body
|
||||
thead tr {
|
||||
border-bottom: 1px solid @gray;
|
||||
}
|
||||
|
||||
// only apply to tr in the body, not the header
|
||||
tbody tr {
|
||||
border-top: 1px solid @gray;
|
||||
&:first-child {
|
||||
border-top: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.leaflet-popup-tip-container, .leaflet-popup-close-button {
|
||||
|
|
|
@ -555,7 +555,6 @@ define(function (require) {
|
|||
layer.bindPopup(popup)
|
||||
.on('mouseover', function (e) {
|
||||
var content = self.tooltipFormatter(feature);
|
||||
console.log(content);
|
||||
if (!content) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue