mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
panel: fixes #7970. Description tooltip overflow.
This seems to work for the three use cases: - Overflow on the left - Overflow on the right - Elements that are out of view on page load
This commit is contained in:
@@ -156,11 +156,21 @@ module.directive('grafanaPanel', function($rootScope, $document) {
|
|||||||
content: function() {
|
content: function() {
|
||||||
return ctrl.getInfoContent({mode: 'tooltip'});
|
return ctrl.getInfoContent({mode: 'tooltip'});
|
||||||
},
|
},
|
||||||
position: 'top center',
|
|
||||||
classes: ctrl.error ? 'drop-error' : 'drop-help',
|
classes: ctrl.error ? 'drop-error' : 'drop-help',
|
||||||
openOn: 'hover',
|
openOn: 'hover',
|
||||||
hoverOpenDelay: 100,
|
hoverOpenDelay: 100,
|
||||||
constrainToScrollParent: false,
|
remove: true,
|
||||||
|
tetherOptions: {
|
||||||
|
attachment: 'bottom left',
|
||||||
|
targetAttachment: 'top left',
|
||||||
|
constraints: [
|
||||||
|
{
|
||||||
|
to: 'window',
|
||||||
|
attachment: 'together',
|
||||||
|
pin: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -185,6 +195,10 @@ module.directive('grafanaPanel', function($rootScope, $document) {
|
|||||||
if (ctrl.skippedLastRefresh) {
|
if (ctrl.skippedLastRefresh) {
|
||||||
ctrl.refresh();
|
ctrl.refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (infoDrop) {
|
||||||
|
infoDrop.position();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$document.on('scroll', refreshOnScroll);
|
$document.on('scroll', refreshOnScroll);
|
||||||
|
|||||||
Reference in New Issue
Block a user