mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Rendering: Fix dashboard screenshot (#73190)
Rendering: fix dashboard screenshot
This commit is contained in:
@@ -6,6 +6,7 @@ import { Subscription } from 'rxjs';
|
|||||||
|
|
||||||
import { config } from '@grafana/runtime';
|
import { config } from '@grafana/runtime';
|
||||||
import { GRID_CELL_HEIGHT, GRID_CELL_VMARGIN, GRID_COLUMN_COUNT } from 'app/core/constants';
|
import { GRID_CELL_HEIGHT, GRID_CELL_VMARGIN, GRID_COLUMN_COUNT } from 'app/core/constants';
|
||||||
|
import { contextSrv } from 'app/core/services/context_srv';
|
||||||
import { DashboardPanelsChangedEvent } from 'app/types/events';
|
import { DashboardPanelsChangedEvent } from 'app/types/events';
|
||||||
|
|
||||||
import { AddLibraryPanelWidget } from '../components/AddLibraryPanelWidget';
|
import { AddLibraryPanelWidget } from '../components/AddLibraryPanelWidget';
|
||||||
@@ -207,7 +208,7 @@ export class DashboardGrid extends PureComponent<Props> {
|
|||||||
* This can be quite distracting and make the dashboard appear to less snappy.
|
* This can be quite distracting and make the dashboard appear to less snappy.
|
||||||
*/
|
*/
|
||||||
onGetWrapperDivRef = (ref: HTMLDivElement | null) => {
|
onGetWrapperDivRef = (ref: HTMLDivElement | null) => {
|
||||||
if (ref) {
|
if (ref && contextSrv.user.authenticatedBy !== 'render') {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
ref.classList.add('react-grid-layout--enable-move-animations');
|
ref.classList.add('react-grid-layout--enable-move-animations');
|
||||||
}, 50);
|
}, 50);
|
||||||
|
|||||||
Reference in New Issue
Block a user