From 0edb0c5c4fe54ceb4360347227e6d4bd5854a0af Mon Sep 17 00:00:00 2001 From: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com> Date: Fri, 26 Jul 2024 14:37:07 -0700 Subject: [PATCH] Canvas: Always show rotation in layout editor (#90571) * Canvas: Always display rotation in layout editor * Simplify condition * Set default rotation from options if null --- .../plugins/panel/canvas/editor/element/PlacementEditor.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/app/plugins/panel/canvas/editor/element/PlacementEditor.tsx b/public/app/plugins/panel/canvas/editor/element/PlacementEditor.tsx index 51668f7c4bd..9baee2d1d31 100644 --- a/public/app/plugins/panel/canvas/editor/element/PlacementEditor.tsx +++ b/public/app/plugins/panel/canvas/editor/element/PlacementEditor.tsx @@ -48,6 +48,10 @@ export function PlacementEditor({ item }: Props) { const { options } = element; const { placement, constraint: layout } = options; + if (placement) { + placement.rotation = placement?.rotation ?? 0; + } + const reselectElementAfterChange = () => { setTimeout(() => { settings.scene.select({ targets: [element.div!] });