@@ -30,17 +30,18 @@ class SchemaDesigner {
3030 this . setupToolbar ( ) ;
3131 }
3232 setupColors ( ) {
33- this . _container . style . setProperty ( "--sd-toolbar-background-color" , this . _config . colors . toolbarBackground ) ;
34- this . _container . style . setProperty ( "--sd-toolbar-foreground-color" , this . _config . colors . toolbarForeground ) ;
35- this . _container . style . setProperty ( "--sd-toolbar-hover-background-color" , this . _config . colors . toolbarHoverBackground ) ;
36- this . _container . style . setProperty ( "--sd-toolbar-divider-background-color" , this . _config . colors . toolbarDividerBackground ) ;
37- this . _container . style . setProperty ( "--sd-graph-background-color" , this . _config . colors . graphBackground ) ;
38- this . _container . style . setProperty ( "--sd-graph-grid-color" , this . _config . colors . graphGrid ) ;
39- this . _container . style . setProperty ( "--sd-border-color" , this . _config . colors . cellBorder ) ;
40- this . _container . style . setProperty ( "--sd-cell-html-foreground" , this . _config . colors . cellForeground ) ;
41- this . _container . style . setProperty ( "--sd-cell-html-hover-column-background" , this . _config . colors . cellColumnHover ) ;
42- this . _container . style . setProperty ( "--sd-cell-divider-color" , this . _config . colors . cellDivider ) ;
43- this . _container . style . setProperty ( "--sd-graph-background-color" , this . _config . colors . cellBackground ) ;
33+ const body = document . getElementsByTagName ( "body" ) [ 0 ] ;
34+ body . style . setProperty ( "--sd-toolbar-background-color" , this . _config . colors . toolbarBackground ) ;
35+ body . style . setProperty ( "--sd-toolbar-foreground-color" , this . _config . colors . toolbarForeground ) ;
36+ body . style . setProperty ( "--sd-toolbar-hover-background-color" , this . _config . colors . toolbarHoverBackground ) ;
37+ body . style . setProperty ( "--sd-toolbar-divider-background-color" , this . _config . colors . toolbarDividerBackground ) ;
38+ body . style . setProperty ( "--sd-graph-background-color" , this . _config . colors . graphBackground ) ;
39+ body . style . setProperty ( "--sd-graph-grid-color" , this . _config . colors . graphGrid ) ;
40+ body . style . setProperty ( "--sd-border-color" , this . _config . colors . cellBorder ) ;
41+ body . style . setProperty ( "--sd-cell-html-foreground" , this . _config . colors . cellForeground ) ;
42+ body . style . setProperty ( "--sd-cell-html-hover-column-background" , this . _config . colors . cellColumnHover ) ;
43+ body . style . setProperty ( "--sd-cell-divider-color" , this . _config . colors . cellDivider ) ;
44+ body . style . setProperty ( "--sd-graph-background-color" , this . _config . colors . cellBackground ) ;
4445 this . _graph . getStylesheet ( ) . getDefaultVertexStyle ( ) [ "fillColor" ] = this . _config . colors . cellBackground ;
4546 this . _graph . getStylesheet ( ) . getDefaultEdgeStyle ( ) [ "strokeColor" ] = this . _config . colors . edge ;
4647 this . _graph . getStylesheet ( ) . getDefaultVertexStyle ( ) [ 'cellHighlightColor' ] = this . _config . colors . cellHighlight ;
@@ -431,7 +432,7 @@ class SchemaDesigner {
431432 setupToolbar ( ) {
432433 const toolbarBelt = document . createElement ( "div" ) ;
433434 toolbarBelt . classList . add ( "sd-toolbar-belt" ) ;
434- this . _container . appendChild ( toolbarBelt ) ;
435+ this . _container . parentElement . appendChild ( toolbarBelt ) ;
435436 this . _toolbar = new schemaDesignerToolbar_1 . SchemaDesignerToolbar ( toolbarBelt , this . _graph , this . _config ) ;
436437 if ( this . _config . isEditable ) {
437438 this . _toolbar . addButton ( this . _config . icons . addTableIcon , "Add Table" , ( ) => {
0 commit comments