Canvas: Connection properties based on data (#64360)

Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
This commit is contained in:
Adela Almasan
2023-04-25 10:31:45 -07:00
committed by GitHub
co-authored by nmarrs
parent 1421f388ae
commit 12e5101b91
11 changed files with 272 additions and 50 deletions
+3 -1
View File
@@ -4,7 +4,7 @@ import { RegistryItem } from '@grafana/data';
import { PanelOptionsSupplier } from '@grafana/data/src/panel/PanelPlugin';
import { config } from 'app/core/config';
import { DimensionContext } from '../dimensions/context';
import { DimensionContext, ColorDimensionConfig, ScaleDimensionConfig } from '../dimensions';
import { BackgroundConfig, Constraint, LineConfig, Placement } from './types';
@@ -46,6 +46,8 @@ export interface CanvasConnection {
target: ConnectionCoordinates;
targetName?: string;
path: ConnectionPath;
color?: ColorDimensionConfig;
size?: ScaleDimensionConfig;
// See https://github.com/anseki/leader-line#options for more examples of more properties
}
@@ -144,6 +144,8 @@ export class Scene {
this.initMoveable(destroySelecto, enableEditing);
this.currentLayer = this.root;
this.selection.next([]);
this.connections.select(undefined);
this.connections.updateState();
}
});
return this.root;