{"action":"closed","issue":{"url":"https://api.github.com/repos/mar10/fancytree/issues/449","labels_url":"https://api.github.com/repos/mar10/fancytree/issues/449/labels{/name}","comments_url":"https://api.github.com/repos/mar10/fancytree/issues/449/comments","events_url":"https://api.github.com/repos/mar10/fancytree/issues/449/events","html_url":"https://github.com/mar10/fancytree/issues/449","id":86955584,"number":449,"title":"After deleting last child, parent node remains expanded","user":{"login":"bpromasmb","id":12829571,"avatar_url":"https://avatars.githubusercontent.com/u/12829571?v=3","gravatar_id":"","url":"https://api.github.com/users/bpromasmb","html_url":"https://github.com/bpromasmb","followers_url":"https://api.github.com/users/bpromasmb/followers","following_url":"https://api.github.com/users/bpromasmb/following{/other_user}","gists_url":"https://api.github.com/users/bpromasmb/gists{/gist_id}","starred_url":"https://api.github.com/users/bpromasmb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bpromasmb/subscriptions","organizations_url":"https://api.github.com/users/bpromasmb/orgs","repos_url":"https://api.github.com/users/bpromasmb/repos","events_url":"https://api.github.com/users/bpromasmb/events{/privacy}","received_events_url":"https://api.github.com/users/bpromasmb/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-10T12:34:44Z","updated_at":"2015-06-19T06:12:02Z","closed_at":"2015-06-19T06:12:02Z","body":"When you delete the last child of a node, the parent node's css loses its `fancytree-has-children` class, but keeps the `fancytree-expanded` class. So if you're using `ext-glyph` and you delete the last child of a node, the parent node continues to display the icon for `expanderOpen` since it only checks for `node.expanded`.\r\n\r\nI don't know where the attribution of css classes happens so a workaround I found was to change line 77 of glyph.js to \r\n\r\n    }else if( node.expanded && node.hasChildren() ){\r\n\r\nbut I don't want to edit assets, plus, I don't think this is the best solution."}}