mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
parent
a5707788ba
commit
e4c92483dc
@ -25,14 +25,18 @@ export const canvasMigrationHandler = (panel: PanelModel): Partial<Options> => {
|
||||
for (const element of root.elements) {
|
||||
if (element.type === 'ellipse') {
|
||||
// Take existing ellipse specific background and border config and apply it to the element's general background and border config
|
||||
element.background = element.config.backgroundColor;
|
||||
element.border.color = element.config.borderColor;
|
||||
element.border.width = element.config.width;
|
||||
|
||||
// Remove the ellipse specific background and border config
|
||||
delete element.config.backgroundColor;
|
||||
delete element.config.borderColor;
|
||||
delete element.config.width;
|
||||
if (element.config.backgroundColor) {
|
||||
element.background = element.config.backgroundColor;
|
||||
delete element.config.backgroundColor;
|
||||
}
|
||||
if (element.config.borderColor) {
|
||||
element.border.color = element.config.borderColor;
|
||||
delete element.config.borderColor;
|
||||
}
|
||||
if (element.config.width) {
|
||||
element.border.width = element.config.width;
|
||||
delete element.config.width;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user