{"action":"closed","issue":{"url":"https://api.github.com/repos/Ni55aN/D3-Node-Editor/issues/28","repository_url":"https://api.github.com/repos/Ni55aN/D3-Node-Editor","labels_url":"https://api.github.com/repos/Ni55aN/D3-Node-Editor/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/Ni55aN/D3-Node-Editor/issues/28/comments","events_url":"https://api.github.com/repos/Ni55aN/D3-Node-Editor/issues/28/events","html_url":"https://github.com/Ni55aN/D3-Node-Editor/issues/28","id":267475663,"number":28,"title":"Get component by name","user":{"login":"jcaffera42","id":24833174,"avatar_url":"https://avatars3.githubusercontent.com/u/24833174?v=4","gravatar_id":"","url":"https://api.github.com/users/jcaffera42","html_url":"https://github.com/jcaffera42","followers_url":"https://api.github.com/users/jcaffera42/followers","following_url":"https://api.github.com/users/jcaffera42/following{/other_user}","gists_url":"https://api.github.com/users/jcaffera42/gists{/gist_id}","starred_url":"https://api.github.com/users/jcaffera42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcaffera42/subscriptions","organizations_url":"https://api.github.com/users/jcaffera42/orgs","repos_url":"https://api.github.com/users/jcaffera42/repos","events_url":"https://api.github.com/users/jcaffera42/events{/privacy}","received_events_url":"https://api.github.com/users/jcaffera42/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-10-22T15:51:43Z","updated_at":"2017-10-23T02:59:09Z","closed_at":"2017-10-23T02:59:09Z","author_association":"NONE","body":"When getting the builders of the components, in the demo you get them by position, like this:\r\n\r\n`var menu = new D3NE.ContextMenu({\r\n                'Actions':{\r\n                    'Action': function(){alert('Subitem selected');}\r\n                },\r\n                'Nodes':{\r\n                    'Number': components[0].builder, \r\n                    'Add': components[1].builder\r\n                }\r\n           });`\r\n\r\n\r\nIn my opinion it would be much more useful to get the builders by their name, something like `components.getComponent('number').builder,` mainly because if the components are loaded dynamically, you probably won't know the order in which they are added into the collection (this is my case).\r\n\r\nThanks!"}}
{"actor":{"display_login":"jcaffera42"}}