{"action":"created","issue":{"url":"https://api.github.com/repos/neveldo/jQuery-Mapael/issues/149","labels_url":"https://api.github.com/repos/neveldo/jQuery-Mapael/issues/149/labels{/name}","comments_url":"https://api.github.com/repos/neveldo/jQuery-Mapael/issues/149/comments","events_url":"https://api.github.com/repos/neveldo/jQuery-Mapael/issues/149/events","html_url":"https://github.com/neveldo/jQuery-Mapael/pull/149","id":119390291,"number":149,"title":"New architecture: prototype pattern","user":{"login":"Indigo744","id":7137528,"avatar_url":"https://avatars.githubusercontent.com/u/7137528?v=3","gravatar_id":"","url":"https://api.github.com/users/Indigo744","html_url":"https://github.com/Indigo744","followers_url":"https://api.github.com/users/Indigo744/followers","following_url":"https://api.github.com/users/Indigo744/following{/other_user}","gists_url":"https://api.github.com/users/Indigo744/gists{/gist_id}","starred_url":"https://api.github.com/users/Indigo744/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Indigo744/subscriptions","organizations_url":"https://api.github.com/users/Indigo744/orgs","repos_url":"https://api.github.com/users/Indigo744/repos","events_url":"https://api.github.com/users/Indigo744/events{/privacy}","received_events_url":"https://api.github.com/users/Indigo744/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-29T21:42:02Z","updated_at":"2015-11-30T21:15:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/neveldo/jQuery-Mapael/pulls/149","html_url":"https://github.com/neveldo/jQuery-Mapael/pull/149","diff_url":"https://github.com/neveldo/jQuery-Mapael/pull/149.diff","patch_url":"https://github.com/neveldo/jQuery-Mapael/pull/149.patch"},"body":"Implements #117\r\n\r\nThis one is huge!\r\nNow, `$.fn.mapael` is only a lightweight function wrapper to jquery to build a new object.\r\n`$.mapael` is now an prototype object that is instanciated on an element.\r\nThe constructor only init some internal variable and call `init()`.\r\nThe main modification is that `this` shall be use to address the *current* mapael object (and not `Mapael` anymore!). You will see that I usually assign `self` as `this` at the top of a function in order to avoid misleading name.\r\n\r\nFor the next step, there are a lot of function that can be simplify due to being in an object. For instance, a lot of internal function make use of `$container` as parameter, whereas it could simply be accessible from `self.$container`. But this will make another PR. This one is already big :)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/neveldo/jQuery-Mapael/issues/comments/160763808","html_url":"https://github.com/neveldo/jQuery-Mapael/pull/149#issuecomment-160763808","issue_url":"https://api.github.com/repos/neveldo/jQuery-Mapael/issues/149","id":160763808,"user":{"login":"neveldo","id":1663176,"avatar_url":"https://avatars.githubusercontent.com/u/1663176?v=3","gravatar_id":"","url":"https://api.github.com/users/neveldo","html_url":"https://github.com/neveldo","followers_url":"https://api.github.com/users/neveldo/followers","following_url":"https://api.github.com/users/neveldo/following{/other_user}","gists_url":"https://api.github.com/users/neveldo/gists{/gist_id}","starred_url":"https://api.github.com/users/neveldo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neveldo/subscriptions","organizations_url":"https://api.github.com/users/neveldo/orgs","repos_url":"https://api.github.com/users/neveldo/repos","events_url":"https://api.github.com/users/neveldo/events{/privacy}","received_events_url":"https://api.github.com/users/neveldo/received_events","type":"User","site_admin":false},"created_at":"2015-11-30T21:15:43Z","updated_at":"2015-11-30T21:15:43Z","body":"Great refactoring, thank you ! All the modifications seems to be ok :)"}}