{"action":"created","issue":{"url":"https://api.github.com/repos/cugos/drop-n-chop/issues/31","labels_url":"https://api.github.com/repos/cugos/drop-n-chop/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/cugos/drop-n-chop/issues/31/comments","events_url":"https://api.github.com/repos/cugos/drop-n-chop/issues/31/events","html_url":"https://github.com/cugos/drop-n-chop/pull/31","id":67960786,"number":31,"title":"Reorg to place main component wiring in L.DNC.js","user":{"login":"alukach","id":897290,"avatar_url":"https://avatars.githubusercontent.com/u/897290?v=3","gravatar_id":"","url":"https://api.github.com/users/alukach","html_url":"https://github.com/alukach","followers_url":"https://api.github.com/users/alukach/followers","following_url":"https://api.github.com/users/alukach/following{/other_user}","gists_url":"https://api.github.com/users/alukach/gists{/gist_id}","starred_url":"https://api.github.com/users/alukach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alukach/subscriptions","organizations_url":"https://api.github.com/users/alukach/orgs","repos_url":"https://api.github.com/users/alukach/repos","events_url":"https://api.github.com/users/alukach/events{/privacy}","received_events_url":"https://api.github.com/users/alukach/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cugos/drop-n-chop/labels/refactor","name":"refactor","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-12T21:15:14Z","updated_at":"2015-04-12T21:35:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cugos/drop-n-chop/pulls/31","html_url":"https://github.com/cugos/drop-n-chop/pull/31","diff_url":"https://github.com/cugos/drop-n-chop/pull/31.diff","patch_url":"https://github.com/cugos/drop-n-chop/pull/31.patch"},"body":"Previously, a huge chunk of the app's initialization took place in `L.DNC.MapView._registerEventHandlers()`, which felt a bit strange.  In effort to keep things modular and avoid interdependency, this wiring was moved in `L.DNC.init`, which seems to be an appropriate place to tie everything together."},"comment":{"url":"https://api.github.com/repos/cugos/drop-n-chop/issues/comments/92136049","html_url":"https://github.com/cugos/drop-n-chop/pull/31#issuecomment-92136049","issue_url":"https://api.github.com/repos/cugos/drop-n-chop/issues/31","id":92136049,"user":{"login":"svmatthews","id":1943001,"avatar_url":"https://avatars.githubusercontent.com/u/1943001?v=3","gravatar_id":"","url":"https://api.github.com/users/svmatthews","html_url":"https://github.com/svmatthews","followers_url":"https://api.github.com/users/svmatthews/followers","following_url":"https://api.github.com/users/svmatthews/following{/other_user}","gists_url":"https://api.github.com/users/svmatthews/gists{/gist_id}","starred_url":"https://api.github.com/users/svmatthews/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svmatthews/subscriptions","organizations_url":"https://api.github.com/users/svmatthews/orgs","repos_url":"https://api.github.com/users/svmatthews/repos","events_url":"https://api.github.com/users/svmatthews/events{/privacy}","received_events_url":"https://api.github.com/users/svmatthews/received_events","type":"User","site_admin":false},"created_at":"2015-04-12T21:35:43Z","updated_at":"2015-04-12T21:35:43Z","body":"I agree with this, but it feels a bit weird to have the filereader event handlers in the `init` function though. What if we brought over the first parts like you're doing with the plugins:\r\n\r\n```javascript\r\n// wire L.DNC plugins\r\nthis.dropzone = new L.DNC.DropZone( this._map, {} );\r\nthis.layerlist = new L.DNC.LayerList( { layerContainerId: 'dropzone' }).addTo( this._map );\r\nthis.geoMenu = new L.DNC.Menu( this.layerlist, {} );\r\n```\r\n\r\nbut kept the filereader event handlers `this.dropzone.fileReader.on( \"fileparsed\", function(e){ ...` within `DropZone.FileReader.js`\r\n\r\n"}}