Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
f5454777
Commit
f5454777
authored
Nov 20, 2017
by
Alexander Zobnin
Committed by
Torkel Ödegaard
Nov 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
graph: disable zoom in non-timeseries modes (#9914)
parent
66e42978
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
public/app/plugins/panel/graph/graph.ts
+12
-0
No files found.
public/app/plugins/panel/graph/graph.ts
View file @
f5454777
...
@@ -688,7 +688,14 @@ function graphDirective($rootScope, timeSrv, popoverSrv, contextSrv) {
...
@@ -688,7 +688,14 @@ function graphDirective($rootScope, timeSrv, popoverSrv, contextSrv) {
}
}
elem
.
bind
(
"plotselected"
,
function
(
event
,
ranges
)
{
elem
.
bind
(
"plotselected"
,
function
(
event
,
ranges
)
{
if
(
panel
.
xaxis
.
mode
!==
'time'
)
{
// Skip if panel in histogram or series mode
plot
.
clearSelection
();
return
;
}
if
((
ranges
.
ctrlKey
||
ranges
.
metaKey
)
&&
contextSrv
.
isEditor
)
{
if
((
ranges
.
ctrlKey
||
ranges
.
metaKey
)
&&
contextSrv
.
isEditor
)
{
// Add annotation
setTimeout
(()
=>
{
setTimeout
(()
=>
{
eventManager
.
updateTime
(
ranges
.
xaxis
);
eventManager
.
updateTime
(
ranges
.
xaxis
);
},
100
);
},
100
);
...
@@ -703,6 +710,11 @@ function graphDirective($rootScope, timeSrv, popoverSrv, contextSrv) {
...
@@ -703,6 +710,11 @@ function graphDirective($rootScope, timeSrv, popoverSrv, contextSrv) {
});
});
elem
.
bind
(
"plotclick"
,
function
(
event
,
pos
,
item
)
{
elem
.
bind
(
"plotclick"
,
function
(
event
,
pos
,
item
)
{
if
(
panel
.
xaxis
.
mode
!==
'time'
)
{
// Skip if panel in histogram or series mode
return
;
}
if
((
pos
.
ctrlKey
||
pos
.
metaKey
)
&&
contextSrv
.
isEditor
)
{
if
((
pos
.
ctrlKey
||
pos
.
metaKey
)
&&
contextSrv
.
isEditor
)
{
// Skip if range selected (added in "plotselected" event handler)
// Skip if range selected (added in "plotselected" event handler)
let
isRangeSelection
=
pos
.
x
!==
pos
.
x1
;
let
isRangeSelection
=
pos
.
x
!==
pos
.
x1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment