lexgui 0.6.2 → 0.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2761,13 +2761,13 @@ class GraphEditor {
2761
2761
  nameDom.innerText = name;
2762
2762
 
2763
2763
  // Change name in sidebar
2764
- const graphNameKey = this.currentGraph.name.replace( /\s/g, '' ).replaceAll( '.', '' );
2765
- const sidebarItem = this._sidebar.items.find( v => v.name === graphNameKey );
2764
+ const sidebarItem = this._sidebar.items.find( v => v.name === this.currentGraph.name );
2766
2765
  if( sidebarItem )
2767
2766
  {
2768
- sidebarItem.name = newNameKey;
2767
+ const oldName = sidebarItem.name;
2768
+ sidebarItem.name = name;
2769
2769
  sidebarItem.dom.id = newNameKey;
2770
- sidebarItem.dom.innerHTML = sidebarItem.dom.innerHTML.replace( sidebarItem.dom.innerText, name );
2770
+ sidebarItem.dom.innerHTML = sidebarItem.dom.innerHTML.replace( oldName, name );
2771
2771
  }
2772
2772
 
2773
2773
  // Change registered nodes function