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
f3090d8c
Commit
f3090d8c
authored
Nov 01, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(dashboard): fixed issue with resizing panel, #6442
parent
18056e53
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
public/app/features/panel/panel_directive.ts
+15
-7
No files found.
public/app/features/panel/panel_directive.ts
View file @
f3090d8c
...
...
@@ -56,7 +56,7 @@ var panelTemplate = `
</div>
`
;
module
.
directive
(
'grafanaPanel'
,
function
()
{
module
.
directive
(
'grafanaPanel'
,
function
(
$rootScope
)
{
return
{
restrict
:
'E'
,
template
:
panelTemplate
,
...
...
@@ -72,8 +72,14 @@ module.directive('grafanaPanel', function() {
var
lastHasAlertRule
;
var
lastAlertState
;
var
hasAlertRule
;
var
lastHeight
=
0
;
ctrl
.
events
.
on
(
'render'
,
()
=>
{
if
(
lastHeight
!==
ctrl
.
containerHeight
)
{
panelContainer
.
css
({
minHeight
:
ctrl
.
containerHeight
});
lastHeight
=
ctrl
.
containerHeight
;
}
if
(
transparentLastState
!==
ctrl
.
panel
.
transparent
)
{
panelContainer
.
toggleClass
(
'panel-transparent'
,
ctrl
.
panel
.
transparent
===
true
);
transparentLastState
=
ctrl
.
panel
.
transparent
;
...
...
@@ -102,10 +108,13 @@ module.directive('grafanaPanel', function() {
}
});
scope
.
$watchGroup
([
'ctrl.fullscreen'
,
'ctrl.containerHeight'
],
function
()
{
panelContainer
.
css
({
minHeight
:
ctrl
.
containerHeight
});
elem
.
toggleClass
(
'panel-fullscreen'
,
ctrl
.
fullscreen
?
true
:
false
);
});
var
lastFullscreen
;
$rootScope
.
onAppEvent
(
'panel-change-view'
,
function
(
evt
,
payload
)
{
if
(
lastFullscreen
!==
ctrl
.
fullscreen
)
{
elem
.
toggleClass
(
'panel-fullscreen'
,
ctrl
.
fullscreen
?
true
:
false
);
lastFullscreen
=
ctrl
.
fullscreen
;
}
},
scope
);
}
};
});
...
...
@@ -171,11 +180,10 @@ module.directive('panelResizer', function($rootScope) {
lastPanel
.
span
=
Math
.
round
(
lastPanel
.
span
);
}
ctrl
.
row
.
panelSpanChanged
();
// first digest to propagate panel width change
// then render
$rootScope
.
$apply
(
function
()
{
ctrl
.
row
.
panelSpanChanged
();
setTimeout
(
function
()
{
$rootScope
.
$broadcast
(
'render'
);
});
...
...
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