{"action":"created","comment":{"url":"https://api.github.com/repos/openlayers/ol3/pulls/comments/82546737","pull_request_review_id":3446964,"id":82546737,"diff_hunk":"@@ -795,6 +873,50 @@ ol.interaction.Modify.prototype.handlePointerAtPixel_ = function(pixel, map) {\n \n \n /**\n+ * Returns the distance from a point to a line segment.\n+ *\n+ * @param {ol.Coordinate} pointCoordinates The coordinates of the point from\n+ *        which to calculate the distance.\n+ * @param {ol.ModifySegmentDataType} segmentData The object describing the line\n+ *        segment we are calculating the distance to.\n+ * @return {number} The square of the distance between a point and a line segment.\n+ */\n+ol.interaction.Modify.pointDistanceToSegmentDataSquared_ = function(pointCoordinates, segmentData) {\n+  var geometry = segmentData.geometry;\n+\n+  if (geometry.getType() === ol.geom.GeometryType.CIRCLE) {\n+    var circleGeometry = /** @type {ol.geom.Circle} */ (geometry);\n+\n+    if (segmentData.index === ol.MODIFY_SEGMENT_CIRCLE_CIRCUMFERENCE_INDEX) {\n+      var distanceToCenterSquared = ol.coordinate.squaredDistance(circleGeometry.getCenter(), pointCoordinates);","path":"src/ol/interaction/modify.js","position":251,"original_position":248,"commit_id":"a77b38055bd164093e0ac7291a863e2e587968d7","original_commit_id":"821749eb69c9d194c6977a24372ed7cfb3152164","user":{"login":"marcjansen","id":227934,"avatar_url":"https://avatars.githubusercontent.com/u/227934?v=3","gravatar_id":"","url":"https://api.github.com/users/marcjansen","html_url":"https://github.com/marcjansen","followers_url":"https://api.github.com/users/marcjansen/followers","following_url":"https://api.github.com/users/marcjansen/following{/other_user}","gists_url":"https://api.github.com/users/marcjansen/gists{/gist_id}","starred_url":"https://api.github.com/users/marcjansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcjansen/subscriptions","organizations_url":"https://api.github.com/users/marcjansen/orgs","repos_url":"https://api.github.com/users/marcjansen/repos","events_url":"https://api.github.com/users/marcjansen/events{/privacy}","received_events_url":"https://api.github.com/users/marcjansen/received_events","type":"User","site_admin":false},"body":"We do not enforce a hard limit AFAICT. My personal limit is around `100`, and it used to be at `80`. This isn't a deal-breaker. If you'd extract the `circleGeometry.getCenter()` into a variable and possibly add one or two line breaks, I think we'll be fine. Again, this is just a stylistic thing, We can also merge with this long line.","created_at":"2016-10-10T06:07:58Z","updated_at":"2016-10-10T06:08:23Z","html_url":"https://github.com/openlayers/ol3/pull/5704#discussion_r82546737","pull_request_url":"https://api.github.com/repos/openlayers/ol3/pulls/5704","_links":{"self":{"href":"https://api.github.com/repos/openlayers/ol3/pulls/comments/82546737"},"html":{"href":"https://github.com/openlayers/ol3/pull/5704#discussion_r82546737"},"pull_request":{"href":"https://api.github.com/repos/openlayers/ol3/pulls/5704"}}},"pull_request":{"url":"https://api.github.com/repos/openlayers/ol3/pulls/5704","id":80671713,"html_url":"https://github.com/openlayers/ol3/pull/5704","diff_url":"https://github.com/openlayers/ol3/pull/5704.diff","patch_url":"https://github.com/openlayers/ol3/pull/5704.patch","issue_url":"https://api.github.com/repos/openlayers/ol3/issues/5704","number":5704,"state":"open","locked":false,"title":"Add Circle Modification","user":{"login":"tst-ppenev","id":17442305,"avatar_url":"https://avatars.githubusercontent.com/u/17442305?v=3","gravatar_id":"","url":"https://api.github.com/users/tst-ppenev","html_url":"https://github.com/tst-ppenev","followers_url":"https://api.github.com/users/tst-ppenev/followers","following_url":"https://api.github.com/users/tst-ppenev/following{/other_user}","gists_url":"https://api.github.com/users/tst-ppenev/gists{/gist_id}","starred_url":"https://api.github.com/users/tst-ppenev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tst-ppenev/subscriptions","organizations_url":"https://api.github.com/users/tst-ppenev/orgs","repos_url":"https://api.github.com/users/tst-ppenev/repos","events_url":"https://api.github.com/users/tst-ppenev/events{/privacy}","received_events_url":"https://api.github.com/users/tst-ppenev/received_events","type":"User","site_admin":false},"body":"* Add an `ol.coordinate.distance()` helper method.\r\n\r\n* Add {ModifySegmentDataType#featureSegments} field. It references all modifiable segments that belong to a feature. We need access to them, so we can update them when a circle's center is moved.\r\n\r\n* Circles are broken into two modifiable line segments: center and\r\ncircumference.\r\n\r\n* Add method {@link ol.interaction.Modify#writeCircleGeometry_} for adding a circle to the R*-bush of modifiable segments.\r\n\r\n* Update methods {handleDownEvent_}, {handleDragEvent_}, {handleUpEvent_} and\r\n{handlePointerAtPixel_} to support circle segments.\r\n\r\n* Add helper static methods\r\n{@link ol.interaction.Modify.pointDistanceToSegmentDataSquared_} and\r\n{@link ol.interaction.Modify.closestOnSegmentData_} with support for\r\ncircle line segments.\r\n\r\n* Add constants {@link ol.MODIFY_SEGMENT_CIRCLE_CENTER_INDEX} and\r\n{@link ol.MODIFY_SEGMENT_CIRCLE_CIRCUMFERENCE_INDEX}.\r\n\r\n* Add Circles to <draw-and-modify-features> example.","created_at":"2016-08-09T18:36:09Z","updated_at":"2016-10-10T06:08:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b246c2bcad7c7765746fe94debeb602451770b9e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/openlayers/ol3/pulls/5704/commits","review_comments_url":"https://api.github.com/repos/openlayers/ol3/pulls/5704/comments","review_comment_url":"https://api.github.com/repos/openlayers/ol3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openlayers/ol3/issues/5704/comments","statuses_url":"https://api.github.com/repos/openlayers/ol3/statuses/a77b38055bd164093e0ac7291a863e2e587968d7","head":{"label":"tst-ppenev:master","ref":"master","sha":"a77b38055bd164093e0ac7291a863e2e587968d7","user":{"login":"tst-ppenev","id":17442305,"avatar_url":"https://avatars.githubusercontent.com/u/17442305?v=3","gravatar_id":"","url":"https://api.github.com/users/tst-ppenev","html_url":"https://github.com/tst-ppenev","followers_url":"https://api.github.com/users/tst-ppenev/followers","following_url":"https://api.github.com/users/tst-ppenev/following{/other_user}","gists_url":"https://api.github.com/users/tst-ppenev/gists{/gist_id}","starred_url":"https://api.github.com/users/tst-ppenev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tst-ppenev/subscriptions","organizations_url":"https://api.github.com/users/tst-ppenev/orgs","repos_url":"https://api.github.com/users/tst-ppenev/repos","events_url":"https://api.github.com/users/tst-ppenev/events{/privacy}","received_events_url":"https://api.github.com/users/tst-ppenev/received_events","type":"User","site_admin":false},"repo":{"id":61463693,"name":"ol3","full_name":"tst-ppenev/ol3","owner":{"login":"tst-ppenev","id":17442305,"avatar_url":"https://avatars.githubusercontent.com/u/17442305?v=3","gravatar_id":"","url":"https://api.github.com/users/tst-ppenev","html_url":"https://github.com/tst-ppenev","followers_url":"https://api.github.com/users/tst-ppenev/followers","following_url":"https://api.github.com/users/tst-ppenev/following{/other_user}","gists_url":"https://api.github.com/users/tst-ppenev/gists{/gist_id}","starred_url":"https://api.github.com/users/tst-ppenev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tst-ppenev/subscriptions","organizations_url":"https://api.github.com/users/tst-ppenev/orgs","repos_url":"https://api.github.com/users/tst-ppenev/repos","events_url":"https://api.github.com/users/tst-ppenev/events{/privacy}","received_events_url":"https://api.github.com/users/tst-ppenev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tst-ppenev/ol3","description":"OpenLayers 3","fork":true,"url":"https://api.github.com/repos/tst-ppenev/ol3","forks_url":"https://api.github.com/repos/tst-ppenev/ol3/forks","keys_url":"https://api.github.com/repos/tst-ppenev/ol3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tst-ppenev/ol3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tst-ppenev/ol3/teams","hooks_url":"https://api.github.com/repos/tst-ppenev/ol3/hooks","issue_events_url":"https://api.github.com/repos/tst-ppenev/ol3/issues/events{/number}","events_url":"https://api.github.com/repos/tst-ppenev/ol3/events","assignees_url":"https://api.github.com/repos/tst-ppenev/ol3/assignees{/user}","branches_url":"https://api.github.com/repos/tst-ppenev/ol3/branches{/branch}","tags_url":"https://api.github.com/repos/tst-ppenev/ol3/tags","blobs_url":"https://api.github.com/repos/tst-ppenev/ol3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tst-ppenev/ol3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tst-ppenev/ol3/git/refs{/sha}","trees_url":"https://api.github.com/repos/tst-ppenev/ol3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tst-ppenev/ol3/statuses/{sha}","languages_url":"https://api.github.com/repos/tst-ppenev/ol3/languages","stargazers_url":"https://api.github.com/repos/tst-ppenev/ol3/stargazers","contributors_url":"https://api.github.com/repos/tst-ppenev/ol3/contributors","subscribers_url":"https://api.github.com/repos/tst-ppenev/ol3/subscribers","subscription_url":"https://api.github.com/repos/tst-ppenev/ol3/subscription","commits_url":"https://api.github.com/repos/tst-ppenev/ol3/commits{/sha}","git_commits_url":"https://api.github.com/repos/tst-ppenev/ol3/git/commits{/sha}","comments_url":"https://api.github.com/repos/tst-ppenev/ol3/comments{/number}","issue_comment_url":"https://api.github.com/repos/tst-ppenev/ol3/issues/comments{/number}","contents_url":"https://api.github.com/repos/tst-ppenev/ol3/contents/{+path}","compare_url":"https://api.github.com/repos/tst-ppenev/ol3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tst-ppenev/ol3/merges","archive_url":"https://api.github.com/repos/tst-ppenev/ol3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tst-ppenev/ol3/downloads","issues_url":"https://api.github.com/repos/tst-ppenev/ol3/issues{/number}","pulls_url":"https://api.github.com/repos/tst-ppenev/ol3/pulls{/number}","milestones_url":"https://api.github.com/repos/tst-ppenev/ol3/milestones{/number}","notifications_url":"https://api.github.com/repos/tst-ppenev/ol3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tst-ppenev/ol3/labels{/name}","releases_url":"https://api.github.com/repos/tst-ppenev/ol3/releases{/id}","deployments_url":"https://api.github.com/repos/tst-ppenev/ol3/deployments","created_at":"2016-06-19T03:56:40Z","updated_at":"2016-06-19T03:56:47Z","pushed_at":"2016-10-09T19:04:26Z","git_url":"git://github.com/tst-ppenev/ol3.git","ssh_url":"git@github.com:tst-ppenev/ol3.git","clone_url":"https://github.com/tst-ppenev/ol3.git","svn_url":"https://github.com/tst-ppenev/ol3","homepage":"http://openlayers.org","size":56886,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"openlayers:master","ref":"master","sha":"c0efa21d7f5291b51204a6218f572d867fcddb2c","user":{"login":"openlayers","id":240579,"avatar_url":"https://avatars.githubusercontent.com/u/240579?v=3","gravatar_id":"","url":"https://api.github.com/users/openlayers","html_url":"https://github.com/openlayers","followers_url":"https://api.github.com/users/openlayers/followers","following_url":"https://api.github.com/users/openlayers/following{/other_user}","gists_url":"https://api.github.com/users/openlayers/gists{/gist_id}","starred_url":"https://api.github.com/users/openlayers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openlayers/subscriptions","organizations_url":"https://api.github.com/users/openlayers/orgs","repos_url":"https://api.github.com/users/openlayers/repos","events_url":"https://api.github.com/users/openlayers/events{/privacy}","received_events_url":"https://api.github.com/users/openlayers/received_events","type":"Organization","site_admin":false},"repo":{"id":4723248,"name":"ol3","full_name":"openlayers/ol3","owner":{"login":"openlayers","id":240579,"avatar_url":"https://avatars.githubusercontent.com/u/240579?v=3","gravatar_id":"","url":"https://api.github.com/users/openlayers","html_url":"https://github.com/openlayers","followers_url":"https://api.github.com/users/openlayers/followers","following_url":"https://api.github.com/users/openlayers/following{/other_user}","gists_url":"https://api.github.com/users/openlayers/gists{/gist_id}","starred_url":"https://api.github.com/users/openlayers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openlayers/subscriptions","organizations_url":"https://api.github.com/users/openlayers/orgs","repos_url":"https://api.github.com/users/openlayers/repos","events_url":"https://api.github.com/users/openlayers/events{/privacy}","received_events_url":"https://api.github.com/users/openlayers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openlayers/ol3","description":"OpenLayers 3","fork":false,"url":"https://api.github.com/repos/openlayers/ol3","forks_url":"https://api.github.com/repos/openlayers/ol3/forks","keys_url":"https://api.github.com/repos/openlayers/ol3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openlayers/ol3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openlayers/ol3/teams","hooks_url":"https://api.github.com/repos/openlayers/ol3/hooks","issue_events_url":"https://api.github.com/repos/openlayers/ol3/issues/events{/number}","events_url":"https://api.github.com/repos/openlayers/ol3/events","assignees_url":"https://api.github.com/repos/openlayers/ol3/assignees{/user}","branches_url":"https://api.github.com/repos/openlayers/ol3/branches{/branch}","tags_url":"https://api.github.com/repos/openlayers/ol3/tags","blobs_url":"https://api.github.com/repos/openlayers/ol3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openlayers/ol3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openlayers/ol3/git/refs{/sha}","trees_url":"https://api.github.com/repos/openlayers/ol3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openlayers/ol3/statuses/{sha}","languages_url":"https://api.github.com/repos/openlayers/ol3/languages","stargazers_url":"https://api.github.com/repos/openlayers/ol3/stargazers","contributors_url":"https://api.github.com/repos/openlayers/ol3/contributors","subscribers_url":"https://api.github.com/repos/openlayers/ol3/subscribers","subscription_url":"https://api.github.com/repos/openlayers/ol3/subscription","commits_url":"https://api.github.com/repos/openlayers/ol3/commits{/sha}","git_commits_url":"https://api.github.com/repos/openlayers/ol3/git/commits{/sha}","comments_url":"https://api.github.com/repos/openlayers/ol3/comments{/number}","issue_comment_url":"https://api.github.com/repos/openlayers/ol3/issues/comments{/number}","contents_url":"https://api.github.com/repos/openlayers/ol3/contents/{+path}","compare_url":"https://api.github.com/repos/openlayers/ol3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openlayers/ol3/merges","archive_url":"https://api.github.com/repos/openlayers/ol3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openlayers/ol3/downloads","issues_url":"https://api.github.com/repos/openlayers/ol3/issues{/number}","pulls_url":"https://api.github.com/repos/openlayers/ol3/pulls{/number}","milestones_url":"https://api.github.com/repos/openlayers/ol3/milestones{/number}","notifications_url":"https://api.github.com/repos/openlayers/ol3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openlayers/ol3/labels{/name}","releases_url":"https://api.github.com/repos/openlayers/ol3/releases{/id}","deployments_url":"https://api.github.com/repos/openlayers/ol3/deployments","created_at":"2012-06-20T06:53:59Z","updated_at":"2016-10-09T18:41:55Z","pushed_at":"2016-10-09T19:04:27Z","git_url":"git://github.com/openlayers/ol3.git","ssh_url":"git@github.com:openlayers/ol3.git","clone_url":"https://github.com/openlayers/ol3.git","svn_url":"https://github.com/openlayers/ol3","homepage":"http://openlayers.org","size":104027,"stargazers_count":2094,"watchers_count":2094,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1070,"mirror_url":null,"open_issues_count":470,"forks":1070,"open_issues":470,"watchers":2094,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openlayers/ol3/pulls/5704"},"html":{"href":"https://github.com/openlayers/ol3/pull/5704"},"issue":{"href":"https://api.github.com/repos/openlayers/ol3/issues/5704"},"comments":{"href":"https://api.github.com/repos/openlayers/ol3/issues/5704/comments"},"review_comments":{"href":"https://api.github.com/repos/openlayers/ol3/pulls/5704/comments"},"review_comment":{"href":"https://api.github.com/repos/openlayers/ol3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openlayers/ol3/pulls/5704/commits"},"statuses":{"href":"https://api.github.com/repos/openlayers/ol3/statuses/a77b38055bd164093e0ac7291a863e2e587968d7"}}}}
{"actor":{"display_login":"marcjansen"}}