{"action":"created","comment":{"url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/pulls/comments/195333928","pull_request_review_id":128678733,"id":195333928,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTMzMzkyOA==","diff_hunk":"@@ -392,12 +430,89 @@ var createMapCard = function (dataObject) {\n  * Активирует карту на странице\n  */\n var initMap = function () {\n+  var pins = mapPins.querySelectorAll('.map__pin');\n+  if (pins) {\n+    for (var i = 1; i < pins.length; i++) {\n+      pins[i].classList.remove('map__pin--hidden');\n+    }\n+  }\n   map.classList.remove('map--faded');\n+};\n \n-  var similarAds = getAds(NUMBER_OF_ADS);\n+/**\n+ * Делает форму объявления недоступной\n+ */\n+var disableForm = function () {\n+  noticeForm.classList.add('ad-form--disabled');\n+  noticeFormFieldsets.forEach(function (item) {\n+    item.setAttribute('disabled', 'disabled');\n+  });\n+};\n+/**\n+ * Делает форму объявления доступной\n+ */\n+var initForm = function () {\n+  noticeForm.classList.remove('ad-form--disabled');\n+  noticeFormFieldsets.forEach(function (item) {\n+    item.removeAttribute('disabled', 'disabled');\n+  });\n+};\n+\n+/**\n+ * Передает координаты метки в поле Адрес\n+ * @param {number} leftCord - координата x\n+ * @param {number} topCord - координата y\n+ */\n+var setAdressDisabledValue = function (leftCord, topCord) {\n+  adressField.value = leftCord + ', ' + topCord;\n+};\n+\n+/**\n+ * Вычисляет координаты метки на карте\n+ * @param {string} string - строка с исходными координатами\n+ * @param {number} gap - шаг изменения координат\n+ * @return {number}\n+ */\n+var getPinCord = function (string, gap) {\n+  return Number(string.slice(0, string.search(/px/))) - gap;\n+};\n \n+/**\n+ * Удаляет отображенное объявление\n+ */\n+var deleteDisplayedAD = function () {\n+  map.removeChild(map.querySelector('.map__card'));","path":"js/map.js","position":155,"original_position":155,"commit_id":"f99d6e47dac22fe821efc54f27449f94667dfd2b","original_commit_id":"f99d6e47dac22fe821efc54f27449f94667dfd2b","user":{"login":"fyvfyv","id":3251438,"node_id":"MDQ6VXNlcjMyNTE0Mzg=","avatar_url":"https://avatars2.githubusercontent.com/u/3251438?v=4","gravatar_id":"","url":"https://api.github.com/users/fyvfyv","html_url":"https://github.com/fyvfyv","followers_url":"https://api.github.com/users/fyvfyv/followers","following_url":"https://api.github.com/users/fyvfyv/following{/other_user}","gists_url":"https://api.github.com/users/fyvfyv/gists{/gist_id}","starred_url":"https://api.github.com/users/fyvfyv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fyvfyv/subscriptions","organizations_url":"https://api.github.com/users/fyvfyv/orgs","repos_url":"https://api.github.com/users/fyvfyv/repos","events_url":"https://api.github.com/users/fyvfyv/events{/privacy}","received_events_url":"https://api.github.com/users/fyvfyv/received_events","type":"User","site_admin":false},"body":"[Критерий Д21](https://up.htmlacademy.ru/javascript/14/criteries#advanced-21)","created_at":"2018-06-14T08:07:16Z","updated_at":"2018-06-14T08:09:25Z","html_url":"https://github.com/htmlacademy-javascript/478709-keksobooking/pull/4#discussion_r195333928","pull_request_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/pulls/4","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/pulls/comments/195333928"},"html":{"href":"https://github.com/htmlacademy-javascript/478709-keksobooking/pull/4#discussion_r195333928"},"pull_request":{"href":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/pulls/4","id":194558245,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0NTU4MjQ1","html_url":"https://github.com/htmlacademy-javascript/478709-keksobooking/pull/4","diff_url":"https://github.com/htmlacademy-javascript/478709-keksobooking/pull/4.diff","patch_url":"https://github.com/htmlacademy-javascript/478709-keksobooking/pull/4.patch","issue_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/issues/4","number":4,"state":"open","locked":false,"title":"Личный проект: подробности","user":{"login":"mika193","id":36661070,"node_id":"MDQ6VXNlcjM2NjYxMDcw","avatar_url":"https://avatars0.githubusercontent.com/u/36661070?v=4","gravatar_id":"","url":"https://api.github.com/users/mika193","html_url":"https://github.com/mika193","followers_url":"https://api.github.com/users/mika193/followers","following_url":"https://api.github.com/users/mika193/following{/other_user}","gists_url":"https://api.github.com/users/mika193/gists{/gist_id}","starred_url":"https://api.github.com/users/mika193/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mika193/subscriptions","organizations_url":"https://api.github.com/users/mika193/orgs","repos_url":"https://api.github.com/users/mika193/repos","events_url":"https://api.github.com/users/mika193/events{/privacy}","received_events_url":"https://api.github.com/users/mika193/received_events","type":"User","site_admin":false},"body":"\n\n---\n:mortar_board: [Личный проект: подробности](https://up.htmlacademy.ru/javascript/14/user/478709/tasks/15)\n\n:boom: https://htmlacademy-javascript.github.io/478709-keksobooking/4/","created_at":"2018-06-13T11:43:22Z","updated_at":"2018-06-14T08:09:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0cd242e499f70adf0807434750305d04203d4c61","assignee":{"login":"fyvfyv","id":3251438,"node_id":"MDQ6VXNlcjMyNTE0Mzg=","avatar_url":"https://avatars2.githubusercontent.com/u/3251438?v=4","gravatar_id":"","url":"https://api.github.com/users/fyvfyv","html_url":"https://github.com/fyvfyv","followers_url":"https://api.github.com/users/fyvfyv/followers","following_url":"https://api.github.com/users/fyvfyv/following{/other_user}","gists_url":"https://api.github.com/users/fyvfyv/gists{/gist_id}","starred_url":"https://api.github.com/users/fyvfyv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fyvfyv/subscriptions","organizations_url":"https://api.github.com/users/fyvfyv/orgs","repos_url":"https://api.github.com/users/fyvfyv/repos","events_url":"https://api.github.com/users/fyvfyv/events{/privacy}","received_events_url":"https://api.github.com/users/fyvfyv/received_events","type":"User","site_admin":false},"assignees":[{"login":"fyvfyv","id":3251438,"node_id":"MDQ6VXNlcjMyNTE0Mzg=","avatar_url":"https://avatars2.githubusercontent.com/u/3251438?v=4","gravatar_id":"","url":"https://api.github.com/users/fyvfyv","html_url":"https://github.com/fyvfyv","followers_url":"https://api.github.com/users/fyvfyv/followers","following_url":"https://api.github.com/users/fyvfyv/following{/other_user}","gists_url":"https://api.github.com/users/fyvfyv/gists{/gist_id}","starred_url":"https://api.github.com/users/fyvfyv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fyvfyv/subscriptions","organizations_url":"https://api.github.com/users/fyvfyv/orgs","repos_url":"https://api.github.com/users/fyvfyv/repos","events_url":"https://api.github.com/users/fyvfyv/events{/privacy}","received_events_url":"https://api.github.com/users/fyvfyv/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/pulls/4/commits","review_comments_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/pulls/4/comments","review_comment_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/pulls/comments{/number}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/issues/4/comments","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/statuses/f99d6e47dac22fe821efc54f27449f94667dfd2b","head":{"label":"mika193:module4-task1","ref":"module4-task1","sha":"f99d6e47dac22fe821efc54f27449f94667dfd2b","user":{"login":"mika193","id":36661070,"node_id":"MDQ6VXNlcjM2NjYxMDcw","avatar_url":"https://avatars0.githubusercontent.com/u/36661070?v=4","gravatar_id":"","url":"https://api.github.com/users/mika193","html_url":"https://github.com/mika193","followers_url":"https://api.github.com/users/mika193/followers","following_url":"https://api.github.com/users/mika193/following{/other_user}","gists_url":"https://api.github.com/users/mika193/gists{/gist_id}","starred_url":"https://api.github.com/users/mika193/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mika193/subscriptions","organizations_url":"https://api.github.com/users/mika193/orgs","repos_url":"https://api.github.com/users/mika193/repos","events_url":"https://api.github.com/users/mika193/events{/privacy}","received_events_url":"https://api.github.com/users/mika193/received_events","type":"User","site_admin":false},"repo":{"id":135339458,"node_id":"MDEwOlJlcG9zaXRvcnkxMzUzMzk0NTg=","name":"478709-keksobooking","full_name":"mika193/478709-keksobooking","owner":{"login":"mika193","id":36661070,"node_id":"MDQ6VXNlcjM2NjYxMDcw","avatar_url":"https://avatars0.githubusercontent.com/u/36661070?v=4","gravatar_id":"","url":"https://api.github.com/users/mika193","html_url":"https://github.com/mika193","followers_url":"https://api.github.com/users/mika193/followers","following_url":"https://api.github.com/users/mika193/following{/other_user}","gists_url":"https://api.github.com/users/mika193/gists{/gist_id}","starred_url":"https://api.github.com/users/mika193/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mika193/subscriptions","organizations_url":"https://api.github.com/users/mika193/orgs","repos_url":"https://api.github.com/users/mika193/repos","events_url":"https://api.github.com/users/mika193/events{/privacy}","received_events_url":"https://api.github.com/users/mika193/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mika193/478709-keksobooking","description":"Валерия Ларионова","fork":true,"url":"https://api.github.com/repos/mika193/478709-keksobooking","forks_url":"https://api.github.com/repos/mika193/478709-keksobooking/forks","keys_url":"https://api.github.com/repos/mika193/478709-keksobooking/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mika193/478709-keksobooking/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mika193/478709-keksobooking/teams","hooks_url":"https://api.github.com/repos/mika193/478709-keksobooking/hooks","issue_events_url":"https://api.github.com/repos/mika193/478709-keksobooking/issues/events{/number}","events_url":"https://api.github.com/repos/mika193/478709-keksobooking/events","assignees_url":"https://api.github.com/repos/mika193/478709-keksobooking/assignees{/user}","branches_url":"https://api.github.com/repos/mika193/478709-keksobooking/branches{/branch}","tags_url":"https://api.github.com/repos/mika193/478709-keksobooking/tags","blobs_url":"https://api.github.com/repos/mika193/478709-keksobooking/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mika193/478709-keksobooking/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mika193/478709-keksobooking/git/refs{/sha}","trees_url":"https://api.github.com/repos/mika193/478709-keksobooking/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mika193/478709-keksobooking/statuses/{sha}","languages_url":"https://api.github.com/repos/mika193/478709-keksobooking/languages","stargazers_url":"https://api.github.com/repos/mika193/478709-keksobooking/stargazers","contributors_url":"https://api.github.com/repos/mika193/478709-keksobooking/contributors","subscribers_url":"https://api.github.com/repos/mika193/478709-keksobooking/subscribers","subscription_url":"https://api.github.com/repos/mika193/478709-keksobooking/subscription","commits_url":"https://api.github.com/repos/mika193/478709-keksobooking/commits{/sha}","git_commits_url":"https://api.github.com/repos/mika193/478709-keksobooking/git/commits{/sha}","comments_url":"https://api.github.com/repos/mika193/478709-keksobooking/comments{/number}","issue_comment_url":"https://api.github.com/repos/mika193/478709-keksobooking/issues/comments{/number}","contents_url":"https://api.github.com/repos/mika193/478709-keksobooking/contents/{+path}","compare_url":"https://api.github.com/repos/mika193/478709-keksobooking/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mika193/478709-keksobooking/merges","archive_url":"https://api.github.com/repos/mika193/478709-keksobooking/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mika193/478709-keksobooking/downloads","issues_url":"https://api.github.com/repos/mika193/478709-keksobooking/issues{/number}","pulls_url":"https://api.github.com/repos/mika193/478709-keksobooking/pulls{/number}","milestones_url":"https://api.github.com/repos/mika193/478709-keksobooking/milestones{/number}","notifications_url":"https://api.github.com/repos/mika193/478709-keksobooking/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mika193/478709-keksobooking/labels{/name}","releases_url":"https://api.github.com/repos/mika193/478709-keksobooking/releases{/id}","deployments_url":"https://api.github.com/repos/mika193/478709-keksobooking/deployments","created_at":"2018-05-29T18:49:39Z","updated_at":"2018-06-13T07:44:24Z","pushed_at":"2018-06-13T19:15:38Z","git_url":"git://github.com/mika193/478709-keksobooking.git","ssh_url":"git@github.com:mika193/478709-keksobooking.git","clone_url":"https://github.com/mika193/478709-keksobooking.git","svn_url":"https://github.com/mika193/478709-keksobooking","homepage":null,"size":908,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"htmlacademy-javascript:master","ref":"master","sha":"8c7c2dc17624b353058daebdc2a9bb8f93fce4cf","user":{"login":"htmlacademy-javascript","id":14179712,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTc5NzEy","avatar_url":"https://avatars2.githubusercontent.com/u/14179712?v=4","gravatar_id":"","url":"https://api.github.com/users/htmlacademy-javascript","html_url":"https://github.com/htmlacademy-javascript","followers_url":"https://api.github.com/users/htmlacademy-javascript/followers","following_url":"https://api.github.com/users/htmlacademy-javascript/following{/other_user}","gists_url":"https://api.github.com/users/htmlacademy-javascript/gists{/gist_id}","starred_url":"https://api.github.com/users/htmlacademy-javascript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmlacademy-javascript/subscriptions","organizations_url":"https://api.github.com/users/htmlacademy-javascript/orgs","repos_url":"https://api.github.com/users/htmlacademy-javascript/repos","events_url":"https://api.github.com/users/htmlacademy-javascript/events{/privacy}","received_events_url":"https://api.github.com/users/htmlacademy-javascript/received_events","type":"Organization","site_admin":false},"repo":{"id":135339324,"node_id":"MDEwOlJlcG9zaXRvcnkxMzUzMzkzMjQ=","name":"478709-keksobooking","full_name":"htmlacademy-javascript/478709-keksobooking","owner":{"login":"htmlacademy-javascript","id":14179712,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTc5NzEy","avatar_url":"https://avatars2.githubusercontent.com/u/14179712?v=4","gravatar_id":"","url":"https://api.github.com/users/htmlacademy-javascript","html_url":"https://github.com/htmlacademy-javascript","followers_url":"https://api.github.com/users/htmlacademy-javascript/followers","following_url":"https://api.github.com/users/htmlacademy-javascript/following{/other_user}","gists_url":"https://api.github.com/users/htmlacademy-javascript/gists{/gist_id}","starred_url":"https://api.github.com/users/htmlacademy-javascript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmlacademy-javascript/subscriptions","organizations_url":"https://api.github.com/users/htmlacademy-javascript/orgs","repos_url":"https://api.github.com/users/htmlacademy-javascript/repos","events_url":"https://api.github.com/users/htmlacademy-javascript/events{/privacy}","received_events_url":"https://api.github.com/users/htmlacademy-javascript/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/htmlacademy-javascript/478709-keksobooking","description":"Валерия Ларионова","fork":false,"url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking","forks_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/forks","keys_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/keys{/key_id}","collaborators_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/teams","hooks_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/hooks","issue_events_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/issues/events{/number}","events_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/events","assignees_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/assignees{/user}","branches_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/branches{/branch}","tags_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/tags","blobs_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/git/refs{/sha}","trees_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/git/trees{/sha}","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/statuses/{sha}","languages_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/languages","stargazers_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/stargazers","contributors_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/contributors","subscribers_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/subscribers","subscription_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/subscription","commits_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/commits{/sha}","git_commits_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/git/commits{/sha}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/comments{/number}","issue_comment_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/issues/comments{/number}","contents_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/contents/{+path}","compare_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/compare/{base}...{head}","merges_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/merges","archive_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/downloads","issues_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/issues{/number}","pulls_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/pulls{/number}","milestones_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/milestones{/number}","notifications_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/labels{/name}","releases_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/releases{/id}","deployments_url":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/deployments","created_at":"2018-05-29T18:48:24Z","updated_at":"2018-06-11T17:53:32Z","pushed_at":"2018-06-13T19:16:34Z","git_url":"git://github.com/htmlacademy-javascript/478709-keksobooking.git","ssh_url":"git@github.com:htmlacademy-javascript/478709-keksobooking.git","clone_url":"https://github.com/htmlacademy-javascript/478709-keksobooking.git","svn_url":"https://github.com/htmlacademy-javascript/478709-keksobooking","homepage":"https://github.com/mika193/478709-keksobooking","size":941,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/pulls/4"},"html":{"href":"https://github.com/htmlacademy-javascript/478709-keksobooking/pull/4"},"issue":{"href":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/issues/4"},"comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/htmlacademy-javascript/478709-keksobooking/statuses/f99d6e47dac22fe821efc54f27449f94667dfd2b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"fyvfyv"}}