{"action":"created","comment":{"url":"https://api.github.com/repos/morizotter/TouchVisualizer/pulls/comments/31646547","id":31646547,"diff_hunk":"@@ -0,0 +1,71 @@\n+//\n+//  Visualizer+Simulator.swift\n+//  TouchVisualizer\n+//\n+//  Created by Douglas Bumby on 2015-06-02.\n+//  Copyright (c) 2015 molabo. All rights reserved.\n+//\n+\n+import Foundation\n+\n+extension Visualizer {\n+    public func warnIfSimulator() {\n+        #if (arch(i386) || arch(x86_64)) && os(iOS)\n+            println(\"[TouchVisualizer] Warning: TouchRadius doesn't work on the simulator because it is not possible to read touch radius on it.\")\n+        #endif\n+    }\n+    \n+    // MARK: - Logging\n+    public func log(touch: UITouch) {\n+        if !config.showsLog {\n+            return\n+        }\n+        \n+        var ti = 0.0\n+        var viewLogs = [[String:String]]()\n+        for view in touchViews {\n+            var index = \"\"\n+            \n+            if view.superview != nil {\n+                index = \"\\(ti)\"\n+                ++ti\n+            }\n+            \n+            var phase: String!\n+            switch touch.phase {\n+            case .Began: phase = \"B\"\n+            case .Moved: phase = \"M\"\n+            case .Ended: phase = \"E\"\n+            case .Cancelled: phase = \"C\"\n+            case .Stationary: phase = \"S\"\n+            }\n+            \n+            let x = String(format: \"%.02f\", view.center.x)\n+            let y = String(format: \"%.02f\", view.center.y)\n+            let center = \"(\\(x), \\(y))\"\n+            let radius = String(format: \"%.02f\", touch.majorRadius)\n+            viewLogs.append([\"index\": index, \"center\": center, \"phase\": phase, \"radius\": radius])\n+        }\n+        \n+        var log = \"TV: \"\n+        for viewLog in viewLogs {\n+            \n+            if 0 == count(viewLog[\"index\"]!) {","path":"Pod/Extensions/Visualizer+Simulator.swift","position":53,"original_position":53,"commit_id":"5bb265eebc4da6ee6740920d95fe32b2eeb70c04","original_commit_id":"5bb265eebc4da6ee6740920d95fe32b2eeb70c04","user":{"login":"morizotter","id":536954,"avatar_url":"https://avatars.githubusercontent.com/u/536954?v=3","gravatar_id":"","url":"https://api.github.com/users/morizotter","html_url":"https://github.com/morizotter","followers_url":"https://api.github.com/users/morizotter/followers","following_url":"https://api.github.com/users/morizotter/following{/other_user}","gists_url":"https://api.github.com/users/morizotter/gists{/gist_id}","starred_url":"https://api.github.com/users/morizotter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morizotter/subscriptions","organizations_url":"https://api.github.com/users/morizotter/orgs","repos_url":"https://api.github.com/users/morizotter/repos","events_url":"https://api.github.com/users/morizotter/events{/privacy}","received_events_url":"https://api.github.com/users/morizotter/received_events","type":"User","site_admin":false},"body":"I think easy to change value is left and not so easy to change value is right.","created_at":"2015-06-03T17:18:18Z","updated_at":"2015-06-03T17:18:18Z","html_url":"https://github.com/morizotter/TouchVisualizer/pull/51#discussion_r31646547","pull_request_url":"https://api.github.com/repos/morizotter/TouchVisualizer/pulls/51","_links":{"self":{"href":"https://api.github.com/repos/morizotter/TouchVisualizer/pulls/comments/31646547"},"html":{"href":"https://github.com/morizotter/TouchVisualizer/pull/51#discussion_r31646547"},"pull_request":{"href":"https://api.github.com/repos/morizotter/TouchVisualizer/pulls/51"}}},"pull_request":{"url":"https://api.github.com/repos/morizotter/TouchVisualizer/pulls/51","id":36792877,"html_url":"https://github.com/morizotter/TouchVisualizer/pull/51","diff_url":"https://github.com/morizotter/TouchVisualizer/pull/51.diff","patch_url":"https://github.com/morizotter/TouchVisualizer/pull/51.patch","issue_url":"https://api.github.com/repos/morizotter/TouchVisualizer/issues/51","number":51,"state":"open","locked":false,"title":"Further cleaning and overall improvements to code structure and README.","user":{"login":"istx25","id":6799989,"avatar_url":"https://avatars.githubusercontent.com/u/6799989?v=3","gravatar_id":"","url":"https://api.github.com/users/istx25","html_url":"https://github.com/istx25","followers_url":"https://api.github.com/users/istx25/followers","following_url":"https://api.github.com/users/istx25/following{/other_user}","gists_url":"https://api.github.com/users/istx25/gists{/gist_id}","starred_url":"https://api.github.com/users/istx25/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/istx25/subscriptions","organizations_url":"https://api.github.com/users/istx25/orgs","repos_url":"https://api.github.com/users/istx25/repos","events_url":"https://api.github.com/users/istx25/events{/privacy}","received_events_url":"https://api.github.com/users/istx25/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-03T02:15:00Z","updated_at":"2015-06-03T17:18:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e4e466c0ca9ee7ae326127a79215ce3ca31fd4ba","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/morizotter/TouchVisualizer/pulls/51/commits","review_comments_url":"https://api.github.com/repos/morizotter/TouchVisualizer/pulls/51/comments","review_comment_url":"https://api.github.com/repos/morizotter/TouchVisualizer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/morizotter/TouchVisualizer/issues/51/comments","statuses_url":"https://api.github.com/repos/morizotter/TouchVisualizer/statuses/5bb265eebc4da6ee6740920d95fe32b2eeb70c04","head":{"label":"istx25:master","ref":"master","sha":"5bb265eebc4da6ee6740920d95fe32b2eeb70c04","user":{"login":"istx25","id":6799989,"avatar_url":"https://avatars.githubusercontent.com/u/6799989?v=3","gravatar_id":"","url":"https://api.github.com/users/istx25","html_url":"https://github.com/istx25","followers_url":"https://api.github.com/users/istx25/followers","following_url":"https://api.github.com/users/istx25/following{/other_user}","gists_url":"https://api.github.com/users/istx25/gists{/gist_id}","starred_url":"https://api.github.com/users/istx25/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/istx25/subscriptions","organizations_url":"https://api.github.com/users/istx25/orgs","repos_url":"https://api.github.com/users/istx25/repos","events_url":"https://api.github.com/users/istx25/events{/privacy}","received_events_url":"https://api.github.com/users/istx25/received_events","type":"User","site_admin":false},"repo":{"id":36537261,"name":"touchvisualizer","full_name":"istx25/touchvisualizer","owner":{"login":"istx25","id":6799989,"avatar_url":"https://avatars.githubusercontent.com/u/6799989?v=3","gravatar_id":"","url":"https://api.github.com/users/istx25","html_url":"https://github.com/istx25","followers_url":"https://api.github.com/users/istx25/followers","following_url":"https://api.github.com/users/istx25/following{/other_user}","gists_url":"https://api.github.com/users/istx25/gists{/gist_id}","starred_url":"https://api.github.com/users/istx25/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/istx25/subscriptions","organizations_url":"https://api.github.com/users/istx25/orgs","repos_url":"https://api.github.com/users/istx25/repos","events_url":"https://api.github.com/users/istx25/events{/privacy}","received_events_url":"https://api.github.com/users/istx25/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/istx25/touchvisualizer","description":"Lightweight touch visualization library in Swift. A single line of code and visualize your touches!","fork":true,"url":"https://api.github.com/repos/istx25/touchvisualizer","forks_url":"https://api.github.com/repos/istx25/touchvisualizer/forks","keys_url":"https://api.github.com/repos/istx25/touchvisualizer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/istx25/touchvisualizer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/istx25/touchvisualizer/teams","hooks_url":"https://api.github.com/repos/istx25/touchvisualizer/hooks","issue_events_url":"https://api.github.com/repos/istx25/touchvisualizer/issues/events{/number}","events_url":"https://api.github.com/repos/istx25/touchvisualizer/events","assignees_url":"https://api.github.com/repos/istx25/touchvisualizer/assignees{/user}","branches_url":"https://api.github.com/repos/istx25/touchvisualizer/branches{/branch}","tags_url":"https://api.github.com/repos/istx25/touchvisualizer/tags","blobs_url":"https://api.github.com/repos/istx25/touchvisualizer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/istx25/touchvisualizer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/istx25/touchvisualizer/git/refs{/sha}","trees_url":"https://api.github.com/repos/istx25/touchvisualizer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/istx25/touchvisualizer/statuses/{sha}","languages_url":"https://api.github.com/repos/istx25/touchvisualizer/languages","stargazers_url":"https://api.github.com/repos/istx25/touchvisualizer/stargazers","contributors_url":"https://api.github.com/repos/istx25/touchvisualizer/contributors","subscribers_url":"https://api.github.com/repos/istx25/touchvisualizer/subscribers","subscription_url":"https://api.github.com/repos/istx25/touchvisualizer/subscription","commits_url":"https://api.github.com/repos/istx25/touchvisualizer/commits{/sha}","git_commits_url":"https://api.github.com/repos/istx25/touchvisualizer/git/commits{/sha}","comments_url":"https://api.github.com/repos/istx25/touchvisualizer/comments{/number}","issue_comment_url":"https://api.github.com/repos/istx25/touchvisualizer/issues/comments{/number}","contents_url":"https://api.github.com/repos/istx25/touchvisualizer/contents/{+path}","compare_url":"https://api.github.com/repos/istx25/touchvisualizer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/istx25/touchvisualizer/merges","archive_url":"https://api.github.com/repos/istx25/touchvisualizer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/istx25/touchvisualizer/downloads","issues_url":"https://api.github.com/repos/istx25/touchvisualizer/issues{/number}","pulls_url":"https://api.github.com/repos/istx25/touchvisualizer/pulls{/number}","milestones_url":"https://api.github.com/repos/istx25/touchvisualizer/milestones{/number}","notifications_url":"https://api.github.com/repos/istx25/touchvisualizer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/istx25/touchvisualizer/labels{/name}","releases_url":"https://api.github.com/repos/istx25/touchvisualizer/releases{/id}","created_at":"2015-05-30T01:08:54Z","updated_at":"2015-06-03T02:31:51Z","pushed_at":"2015-06-03T02:12:58Z","git_url":"git://github.com/istx25/touchvisualizer.git","ssh_url":"git@github.com:istx25/touchvisualizer.git","clone_url":"https://github.com/istx25/touchvisualizer.git","svn_url":"https://github.com/istx25/touchvisualizer","homepage":"","size":65460,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"morizotter:master","ref":"master","sha":"5fbe4a95c7c79de03d242626f7c9a8944096c51d","user":{"login":"morizotter","id":536954,"avatar_url":"https://avatars.githubusercontent.com/u/536954?v=3","gravatar_id":"","url":"https://api.github.com/users/morizotter","html_url":"https://github.com/morizotter","followers_url":"https://api.github.com/users/morizotter/followers","following_url":"https://api.github.com/users/morizotter/following{/other_user}","gists_url":"https://api.github.com/users/morizotter/gists{/gist_id}","starred_url":"https://api.github.com/users/morizotter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morizotter/subscriptions","organizations_url":"https://api.github.com/users/morizotter/orgs","repos_url":"https://api.github.com/users/morizotter/repos","events_url":"https://api.github.com/users/morizotter/events{/privacy}","received_events_url":"https://api.github.com/users/morizotter/received_events","type":"User","site_admin":false},"repo":{"id":29810298,"name":"TouchVisualizer","full_name":"morizotter/TouchVisualizer","owner":{"login":"morizotter","id":536954,"avatar_url":"https://avatars.githubusercontent.com/u/536954?v=3","gravatar_id":"","url":"https://api.github.com/users/morizotter","html_url":"https://github.com/morizotter","followers_url":"https://api.github.com/users/morizotter/followers","following_url":"https://api.github.com/users/morizotter/following{/other_user}","gists_url":"https://api.github.com/users/morizotter/gists{/gist_id}","starred_url":"https://api.github.com/users/morizotter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morizotter/subscriptions","organizations_url":"https://api.github.com/users/morizotter/orgs","repos_url":"https://api.github.com/users/morizotter/repos","events_url":"https://api.github.com/users/morizotter/events{/privacy}","received_events_url":"https://api.github.com/users/morizotter/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/morizotter/TouchVisualizer","description":"Lightweight touch visualization library in Swift. A single line of code and visualize your touches!","fork":false,"url":"https://api.github.com/repos/morizotter/TouchVisualizer","forks_url":"https://api.github.com/repos/morizotter/TouchVisualizer/forks","keys_url":"https://api.github.com/repos/morizotter/TouchVisualizer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/morizotter/TouchVisualizer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/morizotter/TouchVisualizer/teams","hooks_url":"https://api.github.com/repos/morizotter/TouchVisualizer/hooks","issue_events_url":"https://api.github.com/repos/morizotter/TouchVisualizer/issues/events{/number}","events_url":"https://api.github.com/repos/morizotter/TouchVisualizer/events","assignees_url":"https://api.github.com/repos/morizotter/TouchVisualizer/assignees{/user}","branches_url":"https://api.github.com/repos/morizotter/TouchVisualizer/branches{/branch}","tags_url":"https://api.github.com/repos/morizotter/TouchVisualizer/tags","blobs_url":"https://api.github.com/repos/morizotter/TouchVisualizer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/morizotter/TouchVisualizer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/morizotter/TouchVisualizer/git/refs{/sha}","trees_url":"https://api.github.com/repos/morizotter/TouchVisualizer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/morizotter/TouchVisualizer/statuses/{sha}","languages_url":"https://api.github.com/repos/morizotter/TouchVisualizer/languages","stargazers_url":"https://api.github.com/repos/morizotter/TouchVisualizer/stargazers","contributors_url":"https://api.github.com/repos/morizotter/TouchVisualizer/contributors","subscribers_url":"https://api.github.com/repos/morizotter/TouchVisualizer/subscribers","subscription_url":"https://api.github.com/repos/morizotter/TouchVisualizer/subscription","commits_url":"https://api.github.com/repos/morizotter/TouchVisualizer/commits{/sha}","git_commits_url":"https://api.github.com/repos/morizotter/TouchVisualizer/git/commits{/sha}","comments_url":"https://api.github.com/repos/morizotter/TouchVisualizer/comments{/number}","issue_comment_url":"https://api.github.com/repos/morizotter/TouchVisualizer/issues/comments{/number}","contents_url":"https://api.github.com/repos/morizotter/TouchVisualizer/contents/{+path}","compare_url":"https://api.github.com/repos/morizotter/TouchVisualizer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/morizotter/TouchVisualizer/merges","archive_url":"https://api.github.com/repos/morizotter/TouchVisualizer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/morizotter/TouchVisualizer/downloads","issues_url":"https://api.github.com/repos/morizotter/TouchVisualizer/issues{/number}","pulls_url":"https://api.github.com/repos/morizotter/TouchVisualizer/pulls{/number}","milestones_url":"https://api.github.com/repos/morizotter/TouchVisualizer/milestones{/number}","notifications_url":"https://api.github.com/repos/morizotter/TouchVisualizer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/morizotter/TouchVisualizer/labels{/name}","releases_url":"https://api.github.com/repos/morizotter/TouchVisualizer/releases{/id}","created_at":"2015-01-25T10:22:25Z","updated_at":"2015-06-03T14:31:17Z","pushed_at":"2015-06-03T02:15:00Z","git_url":"git://github.com/morizotter/TouchVisualizer.git","ssh_url":"git@github.com:morizotter/TouchVisualizer.git","clone_url":"https://github.com/morizotter/TouchVisualizer.git","svn_url":"https://github.com/morizotter/TouchVisualizer","homepage":"","size":66149,"stargazers_count":278,"watchers_count":278,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":5,"forks":15,"open_issues":5,"watchers":278,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/morizotter/TouchVisualizer/pulls/51"},"html":{"href":"https://github.com/morizotter/TouchVisualizer/pull/51"},"issue":{"href":"https://api.github.com/repos/morizotter/TouchVisualizer/issues/51"},"comments":{"href":"https://api.github.com/repos/morizotter/TouchVisualizer/issues/51/comments"},"review_comments":{"href":"https://api.github.com/repos/morizotter/TouchVisualizer/pulls/51/comments"},"review_comment":{"href":"https://api.github.com/repos/morizotter/TouchVisualizer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/morizotter/TouchVisualizer/pulls/51/commits"},"statuses":{"href":"https://api.github.com/repos/morizotter/TouchVisualizer/statuses/5bb265eebc4da6ee6740920d95fe32b2eeb70c04"}}}}