Decouple the orchestrator temporarily
This commit is contained in:
@@ -3,7 +3,6 @@ import { createRef, CSSProperties, PointerEvent as ReactPointerEvent } from 'rea
|
||||
import { SceneLayout, SceneObjectBase, SceneObjectState, VizPanel, SceneGridItemLike } from '@grafana/scenes';
|
||||
|
||||
import { isRepeatCloneOrChildOf } from '../../utils/clone';
|
||||
import { getLayoutOrchestratorFor } from '../../utils/utils';
|
||||
|
||||
import { AutoGridItem } from './AutoGridItem';
|
||||
import { AutoGridLayoutRenderer } from './AutoGridLayoutRenderer';
|
||||
@@ -156,8 +155,6 @@ export class AutoGridLayout extends SceneObjectBase<AutoGridLayoutState> impleme
|
||||
document.body.addEventListener('pointermove', this._onDrag);
|
||||
document.body.addEventListener('pointerup', this._onDragEnd);
|
||||
document.body.classList.add('dashboard-draggable-transparent-selection');
|
||||
|
||||
getLayoutOrchestratorFor(this)?.startDraggingSync(evt, this._draggedGridItem);
|
||||
}
|
||||
|
||||
// Stop inside dragging
|
||||
|
||||
@@ -14,7 +14,6 @@ import {
|
||||
SceneComponentProps,
|
||||
SceneGridItemLike,
|
||||
useSceneObjectState,
|
||||
SceneGridLayoutDragStartEvent,
|
||||
SceneObject,
|
||||
} from '@grafana/scenes';
|
||||
import { Spec as DashboardV2Spec } from '@grafana/schema/dist/esm/schema/dashboard/v2';
|
||||
@@ -39,7 +38,6 @@ import {
|
||||
getVizPanelKeyForPanelId,
|
||||
getGridItemKeyForPanelId,
|
||||
useDashboard,
|
||||
getLayoutOrchestratorFor,
|
||||
getDashboardSceneFor,
|
||||
} from '../../utils/utils';
|
||||
import { useSoloPanelContext } from '../SoloPanelContext';
|
||||
@@ -123,17 +121,6 @@ export class DefaultGridLayoutManager
|
||||
}
|
||||
|
||||
private _activationHandler() {
|
||||
if (config.featureToggles.dashboardNewLayouts) {
|
||||
this._subs.add(
|
||||
this.subscribeToEvent(SceneGridLayoutDragStartEvent, ({ payload: { evt, panel } }) => {
|
||||
const gridItem = panel.parent;
|
||||
if (gridItem instanceof DashboardGridItem) {
|
||||
getLayoutOrchestratorFor(this)?.startDraggingSync(evt, gridItem);
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
this._subs.add(
|
||||
this.state.grid.subscribeToState(({ children: newChildren }, { children: prevChildren }) => {
|
||||
if (newChildren.length === prevChildren.length) {
|
||||
|
||||
Reference in New Issue
Block a user