{"action":"created","comment":{"url":"https://api.github.com/repos/Esri/esri-leaflet/pulls/comments/29090151","id":29090151,"diff_hunk":"@@ -383,22 +383,41 @@\n       return this._service.query();\n     },\n \n+    _getMetadata: function(callback, context){\n+      if(this._metadata){\n+        callback(undefined, this._metadata, this);\n+      } else {\n+        this.metadata(L.Util.bind(function(error, response, context) {\n+          this._metadata = response;\n+          callback(error, this._metadata, this);\n+        }, this));\n+      }\n+    },\n+\n     addFeature: function(feature, callback, context){\n-      this._service.addFeature(feature, function(error, response){\n-        if(!error){\n-          this.refresh();\n-        }\n-        if(callback){\n-          callback.call(context, error, response);\n-        }\n+      this._getMetadata(function(error, metadata, context){","path":"src/Layers/FeatureLayer/FeatureManager.js","position":23,"original_position":23,"commit_id":"5b7f5f384cacb235e4670c9d6acca40ee9622cd1","original_commit_id":"5b7f5f384cacb235e4670c9d6acca40ee9622cd1","user":{"login":"patrickarlt","id":378557,"avatar_url":"https://avatars.githubusercontent.com/u/378557?v=3","gravatar_id":"","url":"https://api.github.com/users/patrickarlt","html_url":"https://github.com/patrickarlt","followers_url":"https://api.github.com/users/patrickarlt/followers","following_url":"https://api.github.com/users/patrickarlt/following{/other_user}","gists_url":"https://api.github.com/users/patrickarlt/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickarlt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickarlt/subscriptions","organizations_url":"https://api.github.com/users/patrickarlt/orgs","repos_url":"https://api.github.com/users/patrickarlt/repos","events_url":"https://api.github.com/users/patrickarlt/events{/privacy}","received_events_url":"https://api.github.com/users/patrickarlt/received_events","type":"User","site_admin":false},"body":"Now that `context` doesn't get passed through you should remove it from here.","created_at":"2015-04-24T22:11:34Z","updated_at":"2015-04-24T22:11:34Z","html_url":"https://github.com/Esri/esri-leaflet/pull/492#discussion_r29090151","pull_request_url":"https://api.github.com/repos/Esri/esri-leaflet/pulls/492","_links":{"self":{"href":"https://api.github.com/repos/Esri/esri-leaflet/pulls/comments/29090151"},"html":{"href":"https://github.com/Esri/esri-leaflet/pull/492#discussion_r29090151"},"pull_request":{"href":"https://api.github.com/repos/Esri/esri-leaflet/pulls/492"}}},"pull_request":{"url":"https://api.github.com/repos/Esri/esri-leaflet/pulls/492","id":31782395,"html_url":"https://github.com/Esri/esri-leaflet/pull/492","diff_url":"https://github.com/Esri/esri-leaflet/pull/492.diff","patch_url":"https://github.com/Esri/esri-leaflet/pull/492.patch","issue_url":"https://api.github.com/repos/Esri/esri-leaflet/issues/492","number":492,"state":"open","locked":false,"title":"fixes for problems in the editing sample","user":{"login":"jgravois","id":3011734,"avatar_url":"https://avatars.githubusercontent.com/u/3011734?v=3","gravatar_id":"","url":"https://api.github.com/users/jgravois","html_url":"https://github.com/jgravois","followers_url":"https://api.github.com/users/jgravois/followers","following_url":"https://api.github.com/users/jgravois/following{/other_user}","gists_url":"https://api.github.com/users/jgravois/gists{/gist_id}","starred_url":"https://api.github.com/users/jgravois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgravois/subscriptions","organizations_url":"https://api.github.com/users/jgravois/orgs","repos_url":"https://api.github.com/users/jgravois/repos","events_url":"https://api.github.com/users/jgravois/events{/privacy}","received_events_url":"https://api.github.com/users/jgravois/received_events","type":"User","site_admin":false},"body":"#### included fixes:\r\n- [x] the dialog which assists with editing attributes doesn't disappear after a feature has been deleted.  (it would be preferable if it were not displayed at all in that scenario)\r\n- [x] its not possible to modify the geometry of a feature after deleting something else.\r\n- [x] 'Pedetrian' is misspelled\r\n- [ ] clicking a feature and then clicking the map triggers an `updateFeature` call, even though the feature hasn't changed\r\n- [x] each time an edit is passed, the featureLayer `load` event is triggered and another set of queries to the service fire.  perhaps this is by design, but it seems like it would be preferable if we could update the L.esri.FeatureLayer and L.FeatureGroup for the Draw plugin more surgically.\r\n\r\nnot sure if its worth doing anything about the other two...","created_at":"2015-03-23T22:54:32Z","updated_at":"2015-04-24T22:11:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d5cc13d895104b10c06b7cd9adb839204383cef9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Esri/esri-leaflet/pulls/492/commits","review_comments_url":"https://api.github.com/repos/Esri/esri-leaflet/pulls/492/comments","review_comment_url":"https://api.github.com/repos/Esri/esri-leaflet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Esri/esri-leaflet/issues/492/comments","statuses_url":"https://api.github.com/repos/Esri/esri-leaflet/statuses/5b7f5f384cacb235e4670c9d6acca40ee9622cd1","head":{"label":"jgravois:editing-sample","ref":"editing-sample","sha":"5b7f5f384cacb235e4670c9d6acca40ee9622cd1","user":{"login":"jgravois","id":3011734,"avatar_url":"https://avatars.githubusercontent.com/u/3011734?v=3","gravatar_id":"","url":"https://api.github.com/users/jgravois","html_url":"https://github.com/jgravois","followers_url":"https://api.github.com/users/jgravois/followers","following_url":"https://api.github.com/users/jgravois/following{/other_user}","gists_url":"https://api.github.com/users/jgravois/gists{/gist_id}","starred_url":"https://api.github.com/users/jgravois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgravois/subscriptions","organizations_url":"https://api.github.com/users/jgravois/orgs","repos_url":"https://api.github.com/users/jgravois/repos","events_url":"https://api.github.com/users/jgravois/events{/privacy}","received_events_url":"https://api.github.com/users/jgravois/received_events","type":"User","site_admin":false},"repo":{"id":17520674,"name":"esri-leaflet","full_name":"jgravois/esri-leaflet","owner":{"login":"jgravois","id":3011734,"avatar_url":"https://avatars.githubusercontent.com/u/3011734?v=3","gravatar_id":"","url":"https://api.github.com/users/jgravois","html_url":"https://github.com/jgravois","followers_url":"https://api.github.com/users/jgravois/followers","following_url":"https://api.github.com/users/jgravois/following{/other_user}","gists_url":"https://api.github.com/users/jgravois/gists{/gist_id}","starred_url":"https://api.github.com/users/jgravois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgravois/subscriptions","organizations_url":"https://api.github.com/users/jgravois/orgs","repos_url":"https://api.github.com/users/jgravois/repos","events_url":"https://api.github.com/users/jgravois/events{/privacy}","received_events_url":"https://api.github.com/users/jgravois/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jgravois/esri-leaflet","description":"A lightweight set of tools for working with ArcGIS services with Leaflet.","fork":true,"url":"https://api.github.com/repos/jgravois/esri-leaflet","forks_url":"https://api.github.com/repos/jgravois/esri-leaflet/forks","keys_url":"https://api.github.com/repos/jgravois/esri-leaflet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jgravois/esri-leaflet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jgravois/esri-leaflet/teams","hooks_url":"https://api.github.com/repos/jgravois/esri-leaflet/hooks","issue_events_url":"https://api.github.com/repos/jgravois/esri-leaflet/issues/events{/number}","events_url":"https://api.github.com/repos/jgravois/esri-leaflet/events","assignees_url":"https://api.github.com/repos/jgravois/esri-leaflet/assignees{/user}","branches_url":"https://api.github.com/repos/jgravois/esri-leaflet/branches{/branch}","tags_url":"https://api.github.com/repos/jgravois/esri-leaflet/tags","blobs_url":"https://api.github.com/repos/jgravois/esri-leaflet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jgravois/esri-leaflet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jgravois/esri-leaflet/git/refs{/sha}","trees_url":"https://api.github.com/repos/jgravois/esri-leaflet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jgravois/esri-leaflet/statuses/{sha}","languages_url":"https://api.github.com/repos/jgravois/esri-leaflet/languages","stargazers_url":"https://api.github.com/repos/jgravois/esri-leaflet/stargazers","contributors_url":"https://api.github.com/repos/jgravois/esri-leaflet/contributors","subscribers_url":"https://api.github.com/repos/jgravois/esri-leaflet/subscribers","subscription_url":"https://api.github.com/repos/jgravois/esri-leaflet/subscription","commits_url":"https://api.github.com/repos/jgravois/esri-leaflet/commits{/sha}","git_commits_url":"https://api.github.com/repos/jgravois/esri-leaflet/git/commits{/sha}","comments_url":"https://api.github.com/repos/jgravois/esri-leaflet/comments{/number}","issue_comment_url":"https://api.github.com/repos/jgravois/esri-leaflet/issues/comments{/number}","contents_url":"https://api.github.com/repos/jgravois/esri-leaflet/contents/{+path}","compare_url":"https://api.github.com/repos/jgravois/esri-leaflet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jgravois/esri-leaflet/merges","archive_url":"https://api.github.com/repos/jgravois/esri-leaflet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jgravois/esri-leaflet/downloads","issues_url":"https://api.github.com/repos/jgravois/esri-leaflet/issues{/number}","pulls_url":"https://api.github.com/repos/jgravois/esri-leaflet/pulls{/number}","milestones_url":"https://api.github.com/repos/jgravois/esri-leaflet/milestones{/number}","notifications_url":"https://api.github.com/repos/jgravois/esri-leaflet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jgravois/esri-leaflet/labels{/name}","releases_url":"https://api.github.com/repos/jgravois/esri-leaflet/releases{/id}","created_at":"2014-03-07T16:50:15Z","updated_at":"2015-04-24T18:43:12Z","pushed_at":"2015-04-24T18:57:16Z","git_url":"git://github.com/jgravois/esri-leaflet.git","ssh_url":"git@github.com:jgravois/esri-leaflet.git","clone_url":"https://github.com/jgravois/esri-leaflet.git","svn_url":"https://github.com/jgravois/esri-leaflet","homepage":"http://esri.github.io/esri-leaflet","size":10002,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Esri:master","ref":"master","sha":"aa124e525a2be2c3fae4362151b444edd3215fa2","user":{"login":"Esri","id":628795,"avatar_url":"https://avatars.githubusercontent.com/u/628795?v=3","gravatar_id":"","url":"https://api.github.com/users/Esri","html_url":"https://github.com/Esri","followers_url":"https://api.github.com/users/Esri/followers","following_url":"https://api.github.com/users/Esri/following{/other_user}","gists_url":"https://api.github.com/users/Esri/gists{/gist_id}","starred_url":"https://api.github.com/users/Esri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Esri/subscriptions","organizations_url":"https://api.github.com/users/Esri/orgs","repos_url":"https://api.github.com/users/Esri/repos","events_url":"https://api.github.com/users/Esri/events{/privacy}","received_events_url":"https://api.github.com/users/Esri/received_events","type":"Organization","site_admin":false},"repo":{"id":10066825,"name":"esri-leaflet","full_name":"Esri/esri-leaflet","owner":{"login":"Esri","id":628795,"avatar_url":"https://avatars.githubusercontent.com/u/628795?v=3","gravatar_id":"","url":"https://api.github.com/users/Esri","html_url":"https://github.com/Esri","followers_url":"https://api.github.com/users/Esri/followers","following_url":"https://api.github.com/users/Esri/following{/other_user}","gists_url":"https://api.github.com/users/Esri/gists{/gist_id}","starred_url":"https://api.github.com/users/Esri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Esri/subscriptions","organizations_url":"https://api.github.com/users/Esri/orgs","repos_url":"https://api.github.com/users/Esri/repos","events_url":"https://api.github.com/users/Esri/events{/privacy}","received_events_url":"https://api.github.com/users/Esri/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Esri/esri-leaflet","description":"A lightweight set of tools for working with ArcGIS services with Leaflet.","fork":false,"url":"https://api.github.com/repos/Esri/esri-leaflet","forks_url":"https://api.github.com/repos/Esri/esri-leaflet/forks","keys_url":"https://api.github.com/repos/Esri/esri-leaflet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Esri/esri-leaflet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Esri/esri-leaflet/teams","hooks_url":"https://api.github.com/repos/Esri/esri-leaflet/hooks","issue_events_url":"https://api.github.com/repos/Esri/esri-leaflet/issues/events{/number}","events_url":"https://api.github.com/repos/Esri/esri-leaflet/events","assignees_url":"https://api.github.com/repos/Esri/esri-leaflet/assignees{/user}","branches_url":"https://api.github.com/repos/Esri/esri-leaflet/branches{/branch}","tags_url":"https://api.github.com/repos/Esri/esri-leaflet/tags","blobs_url":"https://api.github.com/repos/Esri/esri-leaflet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Esri/esri-leaflet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Esri/esri-leaflet/git/refs{/sha}","trees_url":"https://api.github.com/repos/Esri/esri-leaflet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Esri/esri-leaflet/statuses/{sha}","languages_url":"https://api.github.com/repos/Esri/esri-leaflet/languages","stargazers_url":"https://api.github.com/repos/Esri/esri-leaflet/stargazers","contributors_url":"https://api.github.com/repos/Esri/esri-leaflet/contributors","subscribers_url":"https://api.github.com/repos/Esri/esri-leaflet/subscribers","subscription_url":"https://api.github.com/repos/Esri/esri-leaflet/subscription","commits_url":"https://api.github.com/repos/Esri/esri-leaflet/commits{/sha}","git_commits_url":"https://api.github.com/repos/Esri/esri-leaflet/git/commits{/sha}","comments_url":"https://api.github.com/repos/Esri/esri-leaflet/comments{/number}","issue_comment_url":"https://api.github.com/repos/Esri/esri-leaflet/issues/comments{/number}","contents_url":"https://api.github.com/repos/Esri/esri-leaflet/contents/{+path}","compare_url":"https://api.github.com/repos/Esri/esri-leaflet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Esri/esri-leaflet/merges","archive_url":"https://api.github.com/repos/Esri/esri-leaflet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Esri/esri-leaflet/downloads","issues_url":"https://api.github.com/repos/Esri/esri-leaflet/issues{/number}","pulls_url":"https://api.github.com/repos/Esri/esri-leaflet/pulls{/number}","milestones_url":"https://api.github.com/repos/Esri/esri-leaflet/milestones{/number}","notifications_url":"https://api.github.com/repos/Esri/esri-leaflet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Esri/esri-leaflet/labels{/name}","releases_url":"https://api.github.com/repos/Esri/esri-leaflet/releases{/id}","created_at":"2013-05-14T23:08:31Z","updated_at":"2015-04-24T21:52:06Z","pushed_at":"2015-04-24T21:52:06Z","git_url":"git://github.com/Esri/esri-leaflet.git","ssh_url":"git@github.com:Esri/esri-leaflet.git","clone_url":"https://github.com/Esri/esri-leaflet.git","svn_url":"https://github.com/Esri/esri-leaflet","homepage":"http://esri.github.io/esri-leaflet","size":12831,"stargazers_count":383,"watchers_count":383,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":322,"mirror_url":null,"open_issues_count":21,"forks":322,"open_issues":21,"watchers":383,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Esri/esri-leaflet/pulls/492"},"html":{"href":"https://github.com/Esri/esri-leaflet/pull/492"},"issue":{"href":"https://api.github.com/repos/Esri/esri-leaflet/issues/492"},"comments":{"href":"https://api.github.com/repos/Esri/esri-leaflet/issues/492/comments"},"review_comments":{"href":"https://api.github.com/repos/Esri/esri-leaflet/pulls/492/comments"},"review_comment":{"href":"https://api.github.com/repos/Esri/esri-leaflet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Esri/esri-leaflet/pulls/492/commits"},"statuses":{"href":"https://api.github.com/repos/Esri/esri-leaflet/statuses/5b7f5f384cacb235e4670c9d6acca40ee9622cd1"}}}}