mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
grid css transforms: minor refactor (#10128)
This commit is contained in:
parent
3de17ecda7
commit
cd3cf5d19b
@ -107,15 +107,14 @@ function panelHeader($compile) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
elem.find('.panel-menu-toggle').click((evt) => {
|
elem.find('.panel-menu-toggle').click(() => {
|
||||||
console.log(evt);
|
togglePanelStackPosition();
|
||||||
togglePanelState();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function togglePanelMenu(e) {
|
function togglePanelMenu(e) {
|
||||||
if (!isDragged) {
|
if (!isDragged) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
togglePanelState();
|
togglePanelStackPosition();
|
||||||
elem.find('[data-toggle=dropdown]').dropdown('toggle');
|
elem.find('[data-toggle=dropdown]').dropdown('toggle');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -124,7 +123,7 @@ function panelHeader($compile) {
|
|||||||
* Hack for adding special class 'dropdown-menu-open' to the panel.
|
* Hack for adding special class 'dropdown-menu-open' to the panel.
|
||||||
* This class sets z-index for panel and prevents menu overlapping.
|
* This class sets z-index for panel and prevents menu overlapping.
|
||||||
*/
|
*/
|
||||||
function togglePanelState() {
|
function togglePanelStackPosition() {
|
||||||
const menuOpenClass = 'dropdown-menu-open';
|
const menuOpenClass = 'dropdown-menu-open';
|
||||||
const panelGridClass = '.react-grid-item.panel';
|
const panelGridClass = '.react-grid-item.panel';
|
||||||
|
|
||||||
|
@ -53,4 +53,3 @@
|
|||||||
.react-grid-item.react-draggable-dragging.panel {
|
.react-grid-item.react-draggable-dragging.panel {
|
||||||
z-index: $zindex-dropdown;
|
z-index: $zindex-dropdown;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user