{"action":"created","comment":{"url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/pulls/comments/45675410","id":45675410,"diff_hunk":"@@ -1,95 +1,95 @@\n angular.module('colorpicker.module', [])\n-    .factory('Helper', function () {\n-      'use strict';\n+.factory('Helper', function () {\n+  'use strict';\n+  return {\n+    closestSlider: function (elem) {\n+      var matchesSelector = elem.matches || elem.webkitMatchesSelector || elem.mozMatchesSelector || elem.msMatchesSelector;\n+      if (matchesSelector.bind(elem)('I')) {\n+        return elem.parentNode;\n+      }\n+      return elem;\n+    },\n+    getOffset: function (elem, fixedPosition) {\n+      var\n+      x = 0,\n+      y = 0,\n+      scrollX = 0,\n+      scrollY = 0;\n+      while (elem && !isNaN(elem.offsetLeft) && !isNaN(elem.offsetTop)) {\n+        x += elem.offsetLeft;\n+        y += elem.offsetTop;\n+        if (!fixedPosition && elem.tagName === 'BODY') {\n+          scrollX += document.documentElement.scrollLeft || elem.scrollLeft;\n+          scrollY += document.documentElement.scrollTop || elem.scrollTop;\n+        } else {\n+          scrollX += elem.scrollLeft;\n+          scrollY += elem.scrollTop;\n+        }\n+        elem = elem.offsetParent;\n+      }\n       return {\n-        closestSlider: function (elem) {\n-          var matchesSelector = elem.matches || elem.webkitMatchesSelector || elem.mozMatchesSelector || elem.msMatchesSelector;\n-          if (matchesSelector.bind(elem)('I')) {\n-            return elem.parentNode;\n+        top: y,\n+        left: x,\n+        scrollX: scrollX,\n+        scrollY: scrollY\n+      };\n+    },\n+        // a set of RE's that can match strings and generate color tuples. https://github.com/jquery/jquery-color/\n+        stringParsers: [\n+        {\n+          re: /rgba?\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*(?:,\\s*(\\d+(?:\\.\\d+)?)\\s*)?\\)/,\n+          parse: function (execResult) {\n+            return [\n+            execResult[1],","path":"js/bootstrap-colorpicker-module.js","position":49,"original_position":49,"commit_id":"b78a8a212dfc28e655aa44452e4ff2173103389c","original_commit_id":"b78a8a212dfc28e655aa44452e4ff2173103389c","user":{"login":"joshfinnie","id":125098,"avatar_url":"https://avatars.githubusercontent.com/u/125098?v=3","gravatar_id":"","url":"https://api.github.com/users/joshfinnie","html_url":"https://github.com/joshfinnie","followers_url":"https://api.github.com/users/joshfinnie/followers","following_url":"https://api.github.com/users/joshfinnie/following{/other_user}","gists_url":"https://api.github.com/users/joshfinnie/gists{/gist_id}","starred_url":"https://api.github.com/users/joshfinnie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshfinnie/subscriptions","organizations_url":"https://api.github.com/users/joshfinnie/orgs","repos_url":"https://api.github.com/users/joshfinnie/repos","events_url":"https://api.github.com/users/joshfinnie/events{/privacy}","received_events_url":"https://api.github.com/users/joshfinnie/received_events","type":"User","site_admin":false},"body":"These require another tab ->","created_at":"2015-11-23T23:11:47Z","updated_at":"2015-11-23T23:11:47Z","html_url":"https://github.com/TrackMaven/angular-bootstrap-colorpicker/pull/1#discussion_r45675410","pull_request_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/pulls/comments/45675410"},"html":{"href":"https://github.com/TrackMaven/angular-bootstrap-colorpicker/pull/1#discussion_r45675410"},"pull_request":{"href":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/pulls/1","id":51584010,"html_url":"https://github.com/TrackMaven/angular-bootstrap-colorpicker/pull/1","diff_url":"https://github.com/TrackMaven/angular-bootstrap-colorpicker/pull/1.diff","patch_url":"https://github.com/TrackMaven/angular-bootstrap-colorpicker/pull/1.patch","issue_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/issues/1","number":1,"state":"open","locked":false,"title":"Added our version of the color picker","user":{"login":"Nearhan","id":929160,"avatar_url":"https://avatars.githubusercontent.com/u/929160?v=3","gravatar_id":"","url":"https://api.github.com/users/Nearhan","html_url":"https://github.com/Nearhan","followers_url":"https://api.github.com/users/Nearhan/followers","following_url":"https://api.github.com/users/Nearhan/following{/other_user}","gists_url":"https://api.github.com/users/Nearhan/gists{/gist_id}","starred_url":"https://api.github.com/users/Nearhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nearhan/subscriptions","organizations_url":"https://api.github.com/users/Nearhan/orgs","repos_url":"https://api.github.com/users/Nearhan/repos","events_url":"https://api.github.com/users/Nearhan/events{/privacy}","received_events_url":"https://api.github.com/users/Nearhan/received_events","type":"User","site_admin":false},"body":"Added custom events \r\n","created_at":"2015-11-23T21:38:19Z","updated_at":"2015-11-23T23:11:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"120569d30018c4bae8b4a2814617df528dd92254","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/pulls/1/commits","review_comments_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/pulls/1/comments","review_comment_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/issues/1/comments","statuses_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/statuses/b78a8a212dfc28e655aa44452e4ff2173103389c","head":{"label":"TrackMaven:tm-master","ref":"tm-master","sha":"b78a8a212dfc28e655aa44452e4ff2173103389c","user":{"login":"TrackMaven","id":2388536,"avatar_url":"https://avatars.githubusercontent.com/u/2388536?v=3","gravatar_id":"","url":"https://api.github.com/users/TrackMaven","html_url":"https://github.com/TrackMaven","followers_url":"https://api.github.com/users/TrackMaven/followers","following_url":"https://api.github.com/users/TrackMaven/following{/other_user}","gists_url":"https://api.github.com/users/TrackMaven/gists{/gist_id}","starred_url":"https://api.github.com/users/TrackMaven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrackMaven/subscriptions","organizations_url":"https://api.github.com/users/TrackMaven/orgs","repos_url":"https://api.github.com/users/TrackMaven/repos","events_url":"https://api.github.com/users/TrackMaven/events{/privacy}","received_events_url":"https://api.github.com/users/TrackMaven/received_events","type":"Organization","site_admin":false},"repo":{"id":45863408,"name":"angular-bootstrap-colorpicker","full_name":"TrackMaven/angular-bootstrap-colorpicker","owner":{"login":"TrackMaven","id":2388536,"avatar_url":"https://avatars.githubusercontent.com/u/2388536?v=3","gravatar_id":"","url":"https://api.github.com/users/TrackMaven","html_url":"https://github.com/TrackMaven","followers_url":"https://api.github.com/users/TrackMaven/followers","following_url":"https://api.github.com/users/TrackMaven/following{/other_user}","gists_url":"https://api.github.com/users/TrackMaven/gists{/gist_id}","starred_url":"https://api.github.com/users/TrackMaven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrackMaven/subscriptions","organizations_url":"https://api.github.com/users/TrackMaven/orgs","repos_url":"https://api.github.com/users/TrackMaven/repos","events_url":"https://api.github.com/users/TrackMaven/events{/privacy}","received_events_url":"https://api.github.com/users/TrackMaven/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TrackMaven/angular-bootstrap-colorpicker","description":"Native AngularJS colorpicker directive. No dependency on jQuery or jQuery plugin is required.","fork":true,"url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker","forks_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/forks","keys_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/teams","hooks_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/hooks","issue_events_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/issues/events{/number}","events_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/events","assignees_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/assignees{/user}","branches_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/branches{/branch}","tags_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/tags","blobs_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/git/refs{/sha}","trees_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/statuses/{sha}","languages_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/languages","stargazers_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/stargazers","contributors_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/contributors","subscribers_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/subscribers","subscription_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/subscription","commits_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/commits{/sha}","git_commits_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/git/commits{/sha}","comments_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/comments{/number}","issue_comment_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/issues/comments{/number}","contents_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/contents/{+path}","compare_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/merges","archive_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/downloads","issues_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/issues{/number}","pulls_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/pulls{/number}","milestones_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/milestones{/number}","notifications_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/labels{/name}","releases_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/releases{/id}","created_at":"2015-11-09T20:03:58Z","updated_at":"2015-11-09T20:03:59Z","pushed_at":"2015-11-23T22:51:31Z","git_url":"git://github.com/TrackMaven/angular-bootstrap-colorpicker.git","ssh_url":"git@github.com:TrackMaven/angular-bootstrap-colorpicker.git","clone_url":"https://github.com/TrackMaven/angular-bootstrap-colorpicker.git","svn_url":"https://github.com/TrackMaven/angular-bootstrap-colorpicker","homepage":"","size":446,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"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":"TrackMaven:master","ref":"master","sha":"4cdbd1ae15db4123641f8f636e1b64a269d75b58","user":{"login":"TrackMaven","id":2388536,"avatar_url":"https://avatars.githubusercontent.com/u/2388536?v=3","gravatar_id":"","url":"https://api.github.com/users/TrackMaven","html_url":"https://github.com/TrackMaven","followers_url":"https://api.github.com/users/TrackMaven/followers","following_url":"https://api.github.com/users/TrackMaven/following{/other_user}","gists_url":"https://api.github.com/users/TrackMaven/gists{/gist_id}","starred_url":"https://api.github.com/users/TrackMaven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrackMaven/subscriptions","organizations_url":"https://api.github.com/users/TrackMaven/orgs","repos_url":"https://api.github.com/users/TrackMaven/repos","events_url":"https://api.github.com/users/TrackMaven/events{/privacy}","received_events_url":"https://api.github.com/users/TrackMaven/received_events","type":"Organization","site_admin":false},"repo":{"id":45863408,"name":"angular-bootstrap-colorpicker","full_name":"TrackMaven/angular-bootstrap-colorpicker","owner":{"login":"TrackMaven","id":2388536,"avatar_url":"https://avatars.githubusercontent.com/u/2388536?v=3","gravatar_id":"","url":"https://api.github.com/users/TrackMaven","html_url":"https://github.com/TrackMaven","followers_url":"https://api.github.com/users/TrackMaven/followers","following_url":"https://api.github.com/users/TrackMaven/following{/other_user}","gists_url":"https://api.github.com/users/TrackMaven/gists{/gist_id}","starred_url":"https://api.github.com/users/TrackMaven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrackMaven/subscriptions","organizations_url":"https://api.github.com/users/TrackMaven/orgs","repos_url":"https://api.github.com/users/TrackMaven/repos","events_url":"https://api.github.com/users/TrackMaven/events{/privacy}","received_events_url":"https://api.github.com/users/TrackMaven/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TrackMaven/angular-bootstrap-colorpicker","description":"Native AngularJS colorpicker directive. No dependency on jQuery or jQuery plugin is required.","fork":true,"url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker","forks_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/forks","keys_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/teams","hooks_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/hooks","issue_events_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/issues/events{/number}","events_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/events","assignees_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/assignees{/user}","branches_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/branches{/branch}","tags_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/tags","blobs_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/git/refs{/sha}","trees_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/statuses/{sha}","languages_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/languages","stargazers_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/stargazers","contributors_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/contributors","subscribers_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/subscribers","subscription_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/subscription","commits_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/commits{/sha}","git_commits_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/git/commits{/sha}","comments_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/comments{/number}","issue_comment_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/issues/comments{/number}","contents_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/contents/{+path}","compare_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/merges","archive_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/downloads","issues_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/issues{/number}","pulls_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/pulls{/number}","milestones_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/milestones{/number}","notifications_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/labels{/name}","releases_url":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/releases{/id}","created_at":"2015-11-09T20:03:58Z","updated_at":"2015-11-09T20:03:59Z","pushed_at":"2015-11-23T22:51:31Z","git_url":"git://github.com/TrackMaven/angular-bootstrap-colorpicker.git","ssh_url":"git@github.com:TrackMaven/angular-bootstrap-colorpicker.git","clone_url":"https://github.com/TrackMaven/angular-bootstrap-colorpicker.git","svn_url":"https://github.com/TrackMaven/angular-bootstrap-colorpicker","homepage":"","size":446,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"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/TrackMaven/angular-bootstrap-colorpicker/pulls/1"},"html":{"href":"https://github.com/TrackMaven/angular-bootstrap-colorpicker/pull/1"},"issue":{"href":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/issues/1"},"comments":{"href":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/TrackMaven/angular-bootstrap-colorpicker/statuses/b78a8a212dfc28e655aa44452e4ff2173103389c"}}}}