mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix(): zoom out tooltip fix, fixes #4729
This commit is contained in:
parent
49b2743a37
commit
0f16066915
@ -3,7 +3,7 @@
|
||||
<li class="dashnav-move-timeframe gf-timepicker-time-control" bs-tooltip="'Shift time backward <br> (left arrow key)'" data-placement="bottom">
|
||||
<a ng-click='ctrl.move(-1)'><i class="fa fa-chevron-left"></i></a>
|
||||
</li>
|
||||
<li class="dashnav-zoom-out gf-timepicker-time-control" bs-tooltip="'Time range zoom in <br> CTRL+Z'" data-placement="bottom">
|
||||
<li class="dashnav-zoom-out gf-timepicker-time-control" bs-tooltip="'Time range zoom out <br> CTRL+Z'" data-placement="bottom">
|
||||
<a ng-click='ctrl.zoom(2)'>Zoom Out</a></li>
|
||||
</li>
|
||||
<li class="dashnav-move-timeframe gf-timepicker-time-control" bs-tooltip="'Shift time forward <br> (right arrow key)'" data-placement="bottom">
|
||||
|
@ -92,7 +92,7 @@ export class TimePickerCtrl {
|
||||
move(direction) {
|
||||
var range = this.timeSrv.timeRange();
|
||||
|
||||
var timespan = (range.to.valueOf() - range.from.valueOf());
|
||||
var timespan = (range.to.valueOf() - range.from.valueOf()) / 2;
|
||||
var to, from;
|
||||
if (direction === -1) {
|
||||
to = range.to.valueOf() - timespan;
|
||||
|
Loading…
Reference in New Issue
Block a user