File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -207,8 +207,12 @@ class cimmenu {
207207 }
208208
209209 populateDiagramComponents ( ) {
210- this . reactMenu . updateDiagramMenuLinks ( this . templateJson [ "Diagram" ] ) ;
211- this . reactMenu . updateDiagramMenuLinks ( this . templateJson [ "CoordinateSystem" ] ) ;
210+ if ( Object . keys ( this . templateJson [ "Diagram" ] ) . length > 0 ) {
211+ this . reactMenu . updateDiagramMenuLinks ( this . templateJson [ "Diagram" ] ) ;
212+ }
213+ if ( Object . keys ( this . templateJson [ "CoordinateSystem" ] ) . length > 0 ) {
214+ this . reactMenu . updateDiagramMenuLinks ( this . templateJson [ "CoordinateSystem" ] ) ;
215+ }
212216 }
213217
214218 static populatePanelWithData ( panelNode , menuItems , titleText ) {
Original file line number Diff line number Diff line change @@ -58,17 +58,20 @@ class cimsvg {
5858 hideSvg ( ) {
5959 this . svgNode . classList . add ( "nopointer" ) ;
6060 for ( let childNode in this . svgNode . childNodes ) {
61- console . log ( this . svgNode . childNodes [ childNode ] )
6261 if ( this . svgNode . childNodes [ childNode ] . nodeType === Node . ELEMENT_NODE )
63- this . svgNode . childNodes [ childNode ] . classList . add ( "nodisplay" ) ;
62+ {
63+ this . svgNode . childNodes [ childNode ] . classList . add ( "nodisplay" ) ;
64+ }
6465 }
6566 }
6667
6768 showSvg ( ) {
6869 this . svgNode . classList . remove ( "nopointer" ) ;
6970 for ( let childNode in this . svgNode . childNodes ) {
70- console . log ( this . svgNode . childNodes [ childNode ] )
71- this . svgNode . childNodes [ childNode ] . classList . remove ( "nodisplay" ) ;
71+ if ( this . svgNode . childNodes [ childNode ] . nodeType === Node . ELEMENT_NODE )
72+ {
73+ this . svgNode . childNodes [ childNode ] . classList . remove ( "nodisplay" ) ;
74+ }
7275 }
7376 }
7477
You can’t perform that action at this time.
0 commit comments