{"action":"created","comment":{"url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/pulls/comments/79766090","id":79766090,"diff_hunk":"@@ -0,0 +1,202 @@\n+/**\n+  @module ember-flexberry-gis\n+*/\n+\n+import Ember from 'ember';\n+\n+/**\n+  Mixin containing handlers for\n+  {{#crossLink \"FlexberryMapComponent\"}}flexberry-map component's{{/crossLink}} actions.\n+\n+  @class FlexberryMapActionsHandlerMixin\n+  @extends <a href=\"http://emberjs.com/api/classes/Ember.Mixin.html\">Ember.Mixin</a>\n+*/\n+export default Ember.Mixin.create({\n+  actions: {\n+    /**\n+      Handles {{#crossLink \"FlexberryMapComponent/sendingActions.leafletInit:method\"}}flexberry-map component's 'leafletInit' action{{/crossLink}}.\n+      It stores value of action's event object 'map' property in property with given path.\n+\n+      @method actions.onMapInit\n+      @param {String} mutablePropertyPath Path to a property, which value must be mutated on action.\n+      @param {Object} e Action's event object.\n+      @param {Object} e.map Initialized [Leaflet map](http://leafletjs.com/reference-1.0.0.html#map).\n+\n+      @example\n+      templates/my-form.hbs\n+      ```handlebars\n+        {{flexberry-map\n+          lat=model.lat\n+          lng=model.lng\n+          zoom=model.zoom\n+          leafletInit=(action \"onMapLeafletInit\" \"leafletMap\")\n+        }}\n+      ```\n+\n+      controllers/my-form.js\n+      ```javascript\n+        import Ember from 'ember';\n+        import FlexberryMapActionsHandlerMixin from 'ember-flexberry-gis/mixins/flexberry-map-actions-handler';\n+\n+        export default Ember.Controller.extend(FlexberryMapActionsHandlerMixin, {\n+          // Property where leaflet map will be stored after init.\n+          leafletMap: null\n+        });\n+      ```\n+    */\n+    onMapLeafletInit(...args) {\n+      // User can pass any additional arguments to action handler,\n+      // so original action's event object will be the last one in arguments array.\n+      let leafletMapPropertyPath = args[0];\n+      let e = args[args.length - 1];\n+\n+      Ember.assert(\n+        `Wrong type of \\`leafletMapPropertyPath\\` argument: actual type is \\`${leafletMapPropertyPath}\\`, ` +\n+        `but \\`string\\` is expected`,\n+        Ember.typeOf(leafletMapPropertyPath) === 'string');\n+\n+      this.set(leafletMapPropertyPath, e.map);\n+    },\n+\n+    /**\n+      Handles {{#crossLink \"FlexberryMapComponent/sendingActions.leafletDestroy:method\"}}flexberry-map component's 'leafletDestroy' action{{/crossLink}}.\n+      It cleans up previously stored leaflet map.\n+\n+      @method actions.onMapLeafletDestroy\n+      @param {String} leafletMapPropertyPath Path to a previously stored leaflet map, which must be cleaned up on action.\n+\n+      @example\n+      templates/my-form.hbs\n+      ```handlebars\n+        {{flexberry-map\n+          lat=model.lat\n+          lng=model.lng\n+          zoom=model.zoom\n+          leafletInit=(action \"onMapLeafletInit\" \"leafletMap\")\n+          leafletDestroy=(action \"onMapLeafletDestroy\" \"leafletMap\")\n+        }}\n+      ```\n+\n+      controllers/my-form.js\n+      ```javascript\n+        import Ember from 'ember';\n+        import FlexberryMapActionsHandlerMixin from 'ember-flexberry-gis/mixins/flexberry-map-actions-handler';\n+\n+        export default Ember.Controller.extend(FlexberryMapActionsHandlerMixin, {\n+          // Property where leaflet map will be stored after init.\n+          leafletMap: null\n+        });\n+      ```\n+    */\n+    onMapLeafletDestroy(...args) {\n+      let leafletMapPropertyPath = args[0];","path":"addon/mixins/flexberry-map-actions-handler.js","position":92,"original_position":92,"commit_id":"7fd17de9c50e3fc78276666fc9e2ac36d3933ff9","original_commit_id":"7fd17de9c50e3fc78276666fc9e2ac36d3933ff9","user":{"login":"SeregaMatin","id":7602229,"avatar_url":"https://avatars.githubusercontent.com/u/7602229?v=3","gravatar_id":"","url":"https://api.github.com/users/SeregaMatin","html_url":"https://github.com/SeregaMatin","followers_url":"https://api.github.com/users/SeregaMatin/followers","following_url":"https://api.github.com/users/SeregaMatin/following{/other_user}","gists_url":"https://api.github.com/users/SeregaMatin/gists{/gist_id}","starred_url":"https://api.github.com/users/SeregaMatin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeregaMatin/subscriptions","organizations_url":"https://api.github.com/users/SeregaMatin/orgs","repos_url":"https://api.github.com/users/SeregaMatin/repos","events_url":"https://api.github.com/users/SeregaMatin/events{/privacy}","received_events_url":"https://api.github.com/users/SeregaMatin/received_events","type":"User","site_admin":false},"body":"Ember action helper pass arguments array, not an object.\r\nCode like \"onMapLeafletDestory({ leafletMapProopertyPath })\" will throw an exception.","created_at":"2016-09-21T06:17:32Z","updated_at":"2016-09-21T06:17:32Z","html_url":"https://github.com/Flexberry/ember-flexberry-gis/pull/14#discussion_r79766090","pull_request_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/pulls/comments/79766090"},"html":{"href":"https://github.com/Flexberry/ember-flexberry-gis/pull/14#discussion_r79766090"},"pull_request":{"href":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/pulls/14","id":85984103,"html_url":"https://github.com/Flexberry/ember-flexberry-gis/pull/14","diff_url":"https://github.com/Flexberry/ember-flexberry-gis/pull/14.diff","patch_url":"https://github.com/Flexberry/ember-flexberry-gis/pull/14.patch","issue_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/issues/14","number":14,"state":"open","locked":false,"title":"Feature 105919 identify tool","user":{"login":"SeregaMatin","id":7602229,"avatar_url":"https://avatars.githubusercontent.com/u/7602229?v=3","gravatar_id":"","url":"https://api.github.com/users/SeregaMatin","html_url":"https://github.com/SeregaMatin","followers_url":"https://api.github.com/users/SeregaMatin/followers","following_url":"https://api.github.com/users/SeregaMatin/following{/other_user}","gists_url":"https://api.github.com/users/SeregaMatin/gists{/gist_id}","starred_url":"https://api.github.com/users/SeregaMatin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeregaMatin/subscriptions","organizations_url":"https://api.github.com/users/SeregaMatin/orgs","repos_url":"https://api.github.com/users/SeregaMatin/repos","events_url":"https://api.github.com/users/SeregaMatin/events{/privacy}","received_events_url":"https://api.github.com/users/SeregaMatin/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-20T14:15:34Z","updated_at":"2016-09-21T06:17:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bad6b60c3cf8fc1a1ad3a09f669e3402db64a617","assignee":{"login":"kuzkok","id":829195,"avatar_url":"https://avatars.githubusercontent.com/u/829195?v=3","gravatar_id":"","url":"https://api.github.com/users/kuzkok","html_url":"https://github.com/kuzkok","followers_url":"https://api.github.com/users/kuzkok/followers","following_url":"https://api.github.com/users/kuzkok/following{/other_user}","gists_url":"https://api.github.com/users/kuzkok/gists{/gist_id}","starred_url":"https://api.github.com/users/kuzkok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuzkok/subscriptions","organizations_url":"https://api.github.com/users/kuzkok/orgs","repos_url":"https://api.github.com/users/kuzkok/repos","events_url":"https://api.github.com/users/kuzkok/events{/privacy}","received_events_url":"https://api.github.com/users/kuzkok/received_events","type":"User","site_admin":false},"assignees":[{"login":"kuzkok","id":829195,"avatar_url":"https://avatars.githubusercontent.com/u/829195?v=3","gravatar_id":"","url":"https://api.github.com/users/kuzkok","html_url":"https://github.com/kuzkok","followers_url":"https://api.github.com/users/kuzkok/followers","following_url":"https://api.github.com/users/kuzkok/following{/other_user}","gists_url":"https://api.github.com/users/kuzkok/gists{/gist_id}","starred_url":"https://api.github.com/users/kuzkok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuzkok/subscriptions","organizations_url":"https://api.github.com/users/kuzkok/orgs","repos_url":"https://api.github.com/users/kuzkok/repos","events_url":"https://api.github.com/users/kuzkok/events{/privacy}","received_events_url":"https://api.github.com/users/kuzkok/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/pulls/14/commits","review_comments_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/pulls/14/comments","review_comment_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/issues/14/comments","statuses_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/statuses/7fd17de9c50e3fc78276666fc9e2ac36d3933ff9","head":{"label":"Flexberry:feature-105919-identify-tool","ref":"feature-105919-identify-tool","sha":"7fd17de9c50e3fc78276666fc9e2ac36d3933ff9","user":{"login":"Flexberry","id":8894761,"avatar_url":"https://avatars.githubusercontent.com/u/8894761?v=3","gravatar_id":"","url":"https://api.github.com/users/Flexberry","html_url":"https://github.com/Flexberry","followers_url":"https://api.github.com/users/Flexberry/followers","following_url":"https://api.github.com/users/Flexberry/following{/other_user}","gists_url":"https://api.github.com/users/Flexberry/gists{/gist_id}","starred_url":"https://api.github.com/users/Flexberry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Flexberry/subscriptions","organizations_url":"https://api.github.com/users/Flexberry/orgs","repos_url":"https://api.github.com/users/Flexberry/repos","events_url":"https://api.github.com/users/Flexberry/events{/privacy}","received_events_url":"https://api.github.com/users/Flexberry/received_events","type":"Organization","site_admin":false},"repo":{"id":43364399,"name":"ember-flexberry-gis","full_name":"Flexberry/ember-flexberry-gis","owner":{"login":"Flexberry","id":8894761,"avatar_url":"https://avatars.githubusercontent.com/u/8894761?v=3","gravatar_id":"","url":"https://api.github.com/users/Flexberry","html_url":"https://github.com/Flexberry","followers_url":"https://api.github.com/users/Flexberry/followers","following_url":"https://api.github.com/users/Flexberry/following{/other_user}","gists_url":"https://api.github.com/users/Flexberry/gists{/gist_id}","starred_url":"https://api.github.com/users/Flexberry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Flexberry/subscriptions","organizations_url":"https://api.github.com/users/Flexberry/orgs","repos_url":"https://api.github.com/users/Flexberry/repos","events_url":"https://api.github.com/users/Flexberry/events{/privacy}","received_events_url":"https://api.github.com/users/Flexberry/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Flexberry/ember-flexberry-gis","description":"[WIP] GIS module for ember-flexberry","fork":false,"url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis","forks_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/forks","keys_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/teams","hooks_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/hooks","issue_events_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/issues/events{/number}","events_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/events","assignees_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/assignees{/user}","branches_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/branches{/branch}","tags_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/tags","blobs_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/git/refs{/sha}","trees_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/statuses/{sha}","languages_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/languages","stargazers_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/stargazers","contributors_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/contributors","subscribers_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/subscribers","subscription_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/subscription","commits_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/commits{/sha}","git_commits_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/git/commits{/sha}","comments_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/comments{/number}","issue_comment_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/issues/comments{/number}","contents_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/contents/{+path}","compare_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/merges","archive_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/downloads","issues_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/issues{/number}","pulls_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/pulls{/number}","milestones_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/milestones{/number}","notifications_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/labels{/name}","releases_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/releases{/id}","deployments_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/deployments","created_at":"2015-09-29T11:52:27Z","updated_at":"2016-08-10T09:52:24Z","pushed_at":"2016-09-20T21:33:35Z","git_url":"git://github.com/Flexberry/ember-flexberry-gis.git","ssh_url":"git@github.com:Flexberry/ember-flexberry-gis.git","clone_url":"https://github.com/Flexberry/ember-flexberry-gis.git","svn_url":"https://github.com/Flexberry/ember-flexberry-gis","homepage":"https://flexberry-ember-gis-dev.firebaseapp.com","size":688,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Flexberry:develop","ref":"develop","sha":"f057d7c6d6a29dd87c62ebf26937dad4c33e505f","user":{"login":"Flexberry","id":8894761,"avatar_url":"https://avatars.githubusercontent.com/u/8894761?v=3","gravatar_id":"","url":"https://api.github.com/users/Flexberry","html_url":"https://github.com/Flexberry","followers_url":"https://api.github.com/users/Flexberry/followers","following_url":"https://api.github.com/users/Flexberry/following{/other_user}","gists_url":"https://api.github.com/users/Flexberry/gists{/gist_id}","starred_url":"https://api.github.com/users/Flexberry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Flexberry/subscriptions","organizations_url":"https://api.github.com/users/Flexberry/orgs","repos_url":"https://api.github.com/users/Flexberry/repos","events_url":"https://api.github.com/users/Flexberry/events{/privacy}","received_events_url":"https://api.github.com/users/Flexberry/received_events","type":"Organization","site_admin":false},"repo":{"id":43364399,"name":"ember-flexberry-gis","full_name":"Flexberry/ember-flexberry-gis","owner":{"login":"Flexberry","id":8894761,"avatar_url":"https://avatars.githubusercontent.com/u/8894761?v=3","gravatar_id":"","url":"https://api.github.com/users/Flexberry","html_url":"https://github.com/Flexberry","followers_url":"https://api.github.com/users/Flexberry/followers","following_url":"https://api.github.com/users/Flexberry/following{/other_user}","gists_url":"https://api.github.com/users/Flexberry/gists{/gist_id}","starred_url":"https://api.github.com/users/Flexberry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Flexberry/subscriptions","organizations_url":"https://api.github.com/users/Flexberry/orgs","repos_url":"https://api.github.com/users/Flexberry/repos","events_url":"https://api.github.com/users/Flexberry/events{/privacy}","received_events_url":"https://api.github.com/users/Flexberry/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Flexberry/ember-flexberry-gis","description":"[WIP] GIS module for ember-flexberry","fork":false,"url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis","forks_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/forks","keys_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/teams","hooks_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/hooks","issue_events_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/issues/events{/number}","events_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/events","assignees_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/assignees{/user}","branches_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/branches{/branch}","tags_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/tags","blobs_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/git/refs{/sha}","trees_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/statuses/{sha}","languages_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/languages","stargazers_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/stargazers","contributors_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/contributors","subscribers_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/subscribers","subscription_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/subscription","commits_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/commits{/sha}","git_commits_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/git/commits{/sha}","comments_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/comments{/number}","issue_comment_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/issues/comments{/number}","contents_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/contents/{+path}","compare_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/merges","archive_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/downloads","issues_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/issues{/number}","pulls_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/pulls{/number}","milestones_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/milestones{/number}","notifications_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/labels{/name}","releases_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/releases{/id}","deployments_url":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/deployments","created_at":"2015-09-29T11:52:27Z","updated_at":"2016-08-10T09:52:24Z","pushed_at":"2016-09-20T21:33:35Z","git_url":"git://github.com/Flexberry/ember-flexberry-gis.git","ssh_url":"git@github.com:Flexberry/ember-flexberry-gis.git","clone_url":"https://github.com/Flexberry/ember-flexberry-gis.git","svn_url":"https://github.com/Flexberry/ember-flexberry-gis","homepage":"https://flexberry-ember-gis-dev.firebaseapp.com","size":688,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/pulls/14"},"html":{"href":"https://github.com/Flexberry/ember-flexberry-gis/pull/14"},"issue":{"href":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/issues/14"},"comments":{"href":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/Flexberry/ember-flexberry-gis/statuses/7fd17de9c50e3fc78276666fc9e2ac36d3933ff9"}}}}
{"actor":{"display_login":"SeregaMatin"}}