diff --git a/d2plugin/plugin_dagre.go b/d2plugin/plugin_dagre.go index 2e23e0db6..cfdca3b77 100644 --- a/d2plugin/plugin_dagre.go +++ b/d2plugin/plugin_dagre.go @@ -18,7 +18,7 @@ func init() { } type dagrePlugin struct { - opts *d2dagrelayout.Opts + opts *d2dagrelayout.ConfigurableOpts } func (p dagrePlugin) Flags(context.Context) ([]PluginSpecificFlag, error) { @@ -42,7 +42,7 @@ func (p dagrePlugin) Flags(context.Context) ([]PluginSpecificFlag, error) { func (p *dagrePlugin) HydrateOpts(opts []byte) error { if opts != nil { - var dagreOpts d2dagrelayout.Opts + var dagreOpts d2dagrelayout.ConfigurableOpts err := json.Unmarshal(opts, &dagreOpts) if err != nil { return xmain.UsageErrorf("non-dagre layout options given for dagre") diff --git a/d2plugin/plugin_elk.go b/d2plugin/plugin_elk.go index 3667c7154..2d4619bf8 100644 --- a/d2plugin/plugin_elk.go +++ b/d2plugin/plugin_elk.go @@ -33,7 +33,7 @@ func (p elkPlugin) Flags(context.Context) ([]PluginSpecificFlag, error) { { Name: "elk-nodeNodeBetweenLayers", Type: "int64", - Default: d2elklayout.DefaultOpts.NodeSpacing, + Default: int64(d2elklayout.DefaultOpts.NodeSpacing), Usage: "the spacing to be preserved between any pair of nodes of two adjacent layers. https://www.eclipse.org/elk/reference/options/org-eclipse-elk-layered-spacing-nodeNodeBetweenLayers.html", Tag: "spacing.nodeNodeBetweenLayers", }, @@ -47,14 +47,14 @@ func (p elkPlugin) Flags(context.Context) ([]PluginSpecificFlag, error) { { Name: "elk-edgeNodeBetweenLayers", Type: "int64", - Default: d2elklayout.DefaultOpts.EdgeNodeSpacing, + Default: int64(d2elklayout.DefaultOpts.EdgeNodeSpacing), Usage: "the spacing to be preserved between nodes and edges that are routed next to the node’s layer. https://www.eclipse.org/elk/reference/options/org-eclipse-elk-layered-spacing-edgeNodeBetweenLayers.html", Tag: "spacing.edgeNodeBetweenLayers", }, { Name: "elk-nodeSelfLoop", Type: "int64", - Default: d2elklayout.DefaultOpts.SelfLoopSpacing, + Default: int64(d2elklayout.DefaultOpts.SelfLoopSpacing), Usage: "spacing to be preserved between a node and its self loops. https://www.eclipse.org/elk/reference/options/org-eclipse-elk-spacing-nodeSelfLoop.html", Tag: "elk.spacing.nodeSelfLoop", },