From ba908f7235c0649c22a34597ae689e995fe99196 Mon Sep 17 00:00:00 2001 From: drew08t Date: Thu, 26 Oct 2023 15:34:44 -0700 Subject: [PATCH] Switch back to contentComponent --- public/app/features/canvas/runtime/scene.tsx | 2 +- .../plugins/panel/canvas/components/connections/Connections.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/features/canvas/runtime/scene.tsx b/public/app/features/canvas/runtime/scene.tsx index 001100523e9..6298bc38812 100644 --- a/public/app/features/canvas/runtime/scene.tsx +++ b/public/app/features/canvas/runtime/scene.tsx @@ -385,7 +385,7 @@ export class Scene { this.selecto = new Selecto({ container: this.div, - rootContainer: this.transformComponentRef?.current?.instance.wrapperComponent, + rootContainer: this.transformComponentRef?.current?.instance.contentComponent, selectableTargets: targetElements, toggleContinueSelect: 'shift', selectFromInside: false, diff --git a/public/app/plugins/panel/canvas/components/connections/Connections.tsx b/public/app/plugins/panel/canvas/components/connections/Connections.tsx index 80f5fe7043a..07cf2b388b8 100644 --- a/public/app/plugins/panel/canvas/components/connections/Connections.tsx +++ b/public/app/plugins/panel/canvas/components/connections/Connections.tsx @@ -105,7 +105,7 @@ export class Connections { const elementBoundingRect = element.div!.getBoundingClientRect(); const transformRef = this.scene.transformComponentRef?.current; - const parentBoundingRect = transformRef?.instance.wrapperComponent?.getBoundingClientRect(); + const parentBoundingRect = transformRef?.instance.contentComponent?.getBoundingClientRect(); const transformScale = transformRef?.instance.transformState.scale ?? 1; const relativeTop = elementBoundingRect.top - (parentBoundingRect?.top ?? 0);