diff --git a/public/app/features/canvas/elements/button.tsx b/public/app/features/canvas/elements/button.tsx index a6e8980e7c3..f08bdb450df 100644 --- a/public/app/features/canvas/elements/button.tsx +++ b/public/app/features/canvas/elements/button.tsx @@ -126,6 +126,7 @@ export const buttonItem: CanvasElementItem = { height: options?.placement?.height ?? 78, top: options?.placement?.top ?? 100, left: options?.placement?.left ?? 100, + rotation: options?.placement?.rotation ?? 0, }, }), diff --git a/public/app/features/canvas/elements/cloud.tsx b/public/app/features/canvas/elements/cloud.tsx index c3f3b63f32d..4f1bd04648c 100644 --- a/public/app/features/canvas/elements/cloud.tsx +++ b/public/app/features/canvas/elements/cloud.tsx @@ -99,6 +99,7 @@ export const cloudItem: CanvasElementItem = { height: options?.placement?.height ?? 70, top: options?.placement?.top, left: options?.placement?.left, + rotation: options?.placement?.rotation ?? 0, }, }), diff --git a/public/app/features/canvas/elements/droneFront.tsx b/public/app/features/canvas/elements/droneFront.tsx index d96ce3899e7..29921fced33 100644 --- a/public/app/features/canvas/elements/droneFront.tsx +++ b/public/app/features/canvas/elements/droneFront.tsx @@ -93,6 +93,7 @@ export const droneFrontItem: CanvasElementItem = { height: options?.placement?.height ?? 26, top: options?.placement?.top, left: options?.placement?.left, + rotation: options?.placement?.rotation ?? 0, }, }), diff --git a/public/app/features/canvas/elements/droneSide.tsx b/public/app/features/canvas/elements/droneSide.tsx index cc1821ad63f..aa9ad4b9561 100644 --- a/public/app/features/canvas/elements/droneSide.tsx +++ b/public/app/features/canvas/elements/droneSide.tsx @@ -92,6 +92,7 @@ export const droneSideItem: CanvasElementItem = { height: options?.placement?.height ?? 26, top: options?.placement?.top, left: options?.placement?.left, + rotation: options?.placement?.rotation ?? 0, }, }), diff --git a/public/app/features/canvas/elements/ellipse.tsx b/public/app/features/canvas/elements/ellipse.tsx index 41c1dc67767..8cab935e0ec 100644 --- a/public/app/features/canvas/elements/ellipse.tsx +++ b/public/app/features/canvas/elements/ellipse.tsx @@ -106,6 +106,7 @@ export const ellipseItem: CanvasElementItem = { height: options?.placement?.height ?? 100, top: options?.placement?.top ?? 100, left: options?.placement?.left ?? 100, + rotation: options?.placement?.rotation ?? 0, }, }), diff --git a/public/app/features/canvas/elements/metricValue.tsx b/public/app/features/canvas/elements/metricValue.tsx index 1bcc39f2808..2f5f1a0894e 100644 --- a/public/app/features/canvas/elements/metricValue.tsx +++ b/public/app/features/canvas/elements/metricValue.tsx @@ -174,6 +174,7 @@ export const metricValueItem: CanvasElementItem = { height: options?.placement?.height, top: options?.placement?.top ?? 100, left: options?.placement?.left ?? 100, + rotation: options?.placement?.rotation ?? 0, }, }), diff --git a/public/app/features/canvas/elements/parallelogram.tsx b/public/app/features/canvas/elements/parallelogram.tsx index f442ad3db07..4caec1e776a 100644 --- a/public/app/features/canvas/elements/parallelogram.tsx +++ b/public/app/features/canvas/elements/parallelogram.tsx @@ -99,6 +99,7 @@ export const parallelogramItem: CanvasElementItem = { height: options?.placement?.height ?? 150, top: options?.placement?.top, left: options?.placement?.left, + rotation: options?.placement?.rotation ?? 0, }, }), diff --git a/public/app/features/canvas/elements/server/server.tsx b/public/app/features/canvas/elements/server/server.tsx index dcd8c1393a0..633959b929c 100644 --- a/public/app/features/canvas/elements/server/server.tsx +++ b/public/app/features/canvas/elements/server/server.tsx @@ -80,6 +80,7 @@ export const serverItem: CanvasElementItem = { height: options?.placement?.height ?? 100, top: options?.placement?.top, left: options?.placement?.left, + rotation: options?.placement?.rotation ?? 0, }, config: { type: ServerType.Single, diff --git a/public/app/features/canvas/elements/text.tsx b/public/app/features/canvas/elements/text.tsx index 5f6fb6078f3..7c2af4da6fd 100644 --- a/public/app/features/canvas/elements/text.tsx +++ b/public/app/features/canvas/elements/text.tsx @@ -146,6 +146,7 @@ export const textItem: CanvasElementItem = { height: options?.placement?.height ?? 100, top: options?.placement?.top, left: options?.placement?.left, + rotation: options?.placement?.rotation ?? 0, }, }), diff --git a/public/app/features/canvas/elements/triangle.tsx b/public/app/features/canvas/elements/triangle.tsx index 03743dece21..6af74d68775 100644 --- a/public/app/features/canvas/elements/triangle.tsx +++ b/public/app/features/canvas/elements/triangle.tsx @@ -100,6 +100,7 @@ export const triangleItem: CanvasElementItem = { height: options?.placement?.height ?? 138, top: options?.placement?.top, left: options?.placement?.left, + rotation: options?.placement?.rotation ?? 0, }, }), diff --git a/public/app/features/canvas/elements/windTurbine.tsx b/public/app/features/canvas/elements/windTurbine.tsx index 1ea10e13a33..94f33c9628e 100644 --- a/public/app/features/canvas/elements/windTurbine.tsx +++ b/public/app/features/canvas/elements/windTurbine.tsx @@ -90,6 +90,7 @@ export const windTurbineItem: CanvasElementItem = { height: options?.placement?.height ?? 155, top: options?.placement?.top, left: options?.placement?.left, + rotation: options?.placement?.rotation ?? 0, }, }), diff --git a/public/app/features/canvas/runtime/scene.tsx b/public/app/features/canvas/runtime/scene.tsx index 5e1608551aa..7a1c404679e 100644 --- a/public/app/features/canvas/runtime/scene.tsx +++ b/public/app/features/canvas/runtime/scene.tsx @@ -436,6 +436,7 @@ export class Scene { // Setup rotatable rotatable: allowChanges, throttleRotate: 5, + rotationPosition: ['top', 'right'], // Setup snappable snappable: allowChanges,