mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
PanelChrome: Allow panel to be dragged if set as draggable from the outside (#61698)
This commit is contained in:
@@ -240,6 +240,7 @@ export class DashboardGrid extends PureComponent<Props, State> {
|
||||
cols={GRID_COLUMN_COUNT}
|
||||
rowHeight={GRID_CELL_HEIGHT}
|
||||
draggableHandle=".grid-drag-handle"
|
||||
draggableCancel=".grid-drag-cancel"
|
||||
layout={this.buildLayout()}
|
||||
onDragStop={this.onDragStop}
|
||||
onResize={this.onResize}
|
||||
|
||||
@@ -636,6 +636,8 @@ export class PanelStateWrapper extends PureComponent<Props, State> {
|
||||
const title = panel.getDisplayTitle();
|
||||
const padding: PanelPadding = plugin.noPadding ? 'none' : 'md';
|
||||
|
||||
const dragClass = !(isViewing || isEditing) ? 'grid-drag-handle' : '';
|
||||
|
||||
const titleItems = [
|
||||
<PanelHeaderTitleItems
|
||||
key="title-items"
|
||||
@@ -674,6 +676,8 @@ export class PanelStateWrapper extends PureComponent<Props, State> {
|
||||
description={!!panel.description ? this.onShowPanelDescription : undefined}
|
||||
titleItems={titleItems}
|
||||
menu={menu}
|
||||
dragClass={dragClass}
|
||||
dragClassCancel="grid-drag-cancel"
|
||||
padding={padding}
|
||||
>
|
||||
{(innerWidth, innerHeight) => (
|
||||
|
||||
Reference in New Issue
Block a user