mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 10:50:37 -06:00
Canvas: Update new element type with rotation (#85690)
This commit is contained in:
parent
5cfca8dbf6
commit
eb86fd867f
@ -126,6 +126,7 @@ export const buttonItem: CanvasElementItem<ButtonConfig, ButtonData> = {
|
||||
height: options?.placement?.height ?? 78,
|
||||
top: options?.placement?.top ?? 100,
|
||||
left: options?.placement?.left ?? 100,
|
||||
rotation: options?.placement?.rotation ?? 0,
|
||||
},
|
||||
}),
|
||||
|
||||
|
@ -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,
|
||||
},
|
||||
}),
|
||||
|
||||
|
@ -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,
|
||||
},
|
||||
}),
|
||||
|
||||
|
@ -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,
|
||||
},
|
||||
}),
|
||||
|
||||
|
@ -106,6 +106,7 @@ export const ellipseItem: CanvasElementItem<CanvasElementConfig, CanvasElementDa
|
||||
height: options?.placement?.height ?? 138,
|
||||
top: options?.placement?.top,
|
||||
left: options?.placement?.left,
|
||||
rotation: options?.placement?.rotation ?? 0,
|
||||
},
|
||||
}),
|
||||
|
||||
|
@ -79,6 +79,7 @@ export const iconItem: CanvasElementItem<IconConfig, IconData> = {
|
||||
height: options?.placement?.height ?? 100,
|
||||
top: options?.placement?.top ?? 100,
|
||||
left: options?.placement?.left ?? 100,
|
||||
rotation: options?.placement?.rotation ?? 0,
|
||||
},
|
||||
}),
|
||||
|
||||
|
@ -174,6 +174,7 @@ export const metricValueItem: CanvasElementItem<TextConfig, TextData> = {
|
||||
height: options?.placement?.height,
|
||||
top: options?.placement?.top ?? 100,
|
||||
left: options?.placement?.left ?? 100,
|
||||
rotation: options?.placement?.rotation ?? 0,
|
||||
},
|
||||
}),
|
||||
|
||||
|
@ -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,
|
||||
},
|
||||
}),
|
||||
|
||||
|
@ -80,6 +80,7 @@ export const serverItem: CanvasElementItem<ServerConfig, ServerData> = {
|
||||
height: options?.placement?.height ?? 100,
|
||||
top: options?.placement?.top,
|
||||
left: options?.placement?.left,
|
||||
rotation: options?.placement?.rotation ?? 0,
|
||||
},
|
||||
config: {
|
||||
type: ServerType.Single,
|
||||
|
@ -146,6 +146,7 @@ export const textItem: CanvasElementItem<TextConfig, TextData> = {
|
||||
height: options?.placement?.height ?? 100,
|
||||
top: options?.placement?.top,
|
||||
left: options?.placement?.left,
|
||||
rotation: options?.placement?.rotation ?? 0,
|
||||
},
|
||||
}),
|
||||
|
||||
|
@ -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,
|
||||
},
|
||||
}),
|
||||
|
||||
|
@ -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,
|
||||
},
|
||||
}),
|
||||
|
||||
|
@ -436,6 +436,7 @@ export class Scene {
|
||||
// Setup rotatable
|
||||
rotatable: allowChanges,
|
||||
throttleRotate: 5,
|
||||
rotationPosition: ['top', 'right'],
|
||||
|
||||
// Setup snappable
|
||||
snappable: allowChanges,
|
||||
|
Loading…
Reference in New Issue
Block a user