Merge pull request #2360 from x-delfino/d2-config-center
compiler: support center in d2-config
This commit is contained in:
commit
7741382f92
2 changed files with 9 additions and 1 deletions
|
|
@ -6,4 +6,6 @@
|
||||||
|
|
||||||
#### Bugfixes ⛑️
|
#### Bugfixes ⛑️
|
||||||
|
|
||||||
- Compiler: fixes panic when `sql_shape` shape value had mixed casing [#2349](https://github.com/terrastruct/d2/pull/2349)
|
- Compiler:
|
||||||
|
- fixes panic when `sql_shape` shape value had mixed casing [#2349](https://github.com/terrastruct/d2/pull/2349)
|
||||||
|
- fixes support for `center` in `d2-config` [#2360](https://github.com/terrastruct/d2/pull/2360)
|
||||||
|
|
|
||||||
|
|
@ -1455,6 +1455,12 @@ func compileConfig(ir *d2ir.Map) (*d2target.Config, error) {
|
||||||
config.LayoutEngine = go2.Pointer(f.Primary().Value.ScalarString())
|
config.LayoutEngine = go2.Pointer(f.Primary().Value.ScalarString())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
f = configMap.GetField(d2ast.FlatUnquotedString("center"))
|
||||||
|
if f != nil {
|
||||||
|
val, _ := strconv.ParseBool(f.Primary().Value.ScalarString())
|
||||||
|
config.Center = &val
|
||||||
|
}
|
||||||
|
|
||||||
f = configMap.GetField(d2ast.FlatUnquotedString("theme-overrides"))
|
f = configMap.GetField(d2ast.FlatUnquotedString("theme-overrides"))
|
||||||
if f != nil {
|
if f != nil {
|
||||||
overrides, err := compileThemeOverrides(f.Map())
|
overrides, err := compileThemeOverrides(f.Map())
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue