{"action":"created","comment":{"url":"https://api.github.com/repos/BroadsoftLabs/hubUi/pulls/comments/111753003","pull_request_review_id":33015150,"id":111753003,"diff_hunk":"@@ -0,0 +1,129 @@\n+var HubNav = function($timeout) {\n+  return {\n+    scope: {\n+      items: '=?'\n+    },\n+    replace: true,\n+    transclude: true,\n+    template: require(\"./hubNav.template.pug\"),\n+    link: function (scope, el, attrs, ctrl, transclude) {\n+      let itemsToShow = 5; // default number of items to show in available space\n+      let itemWidth = 60; // default width for the nav item\n+      let slidePosition = 0; // current scroll position in terms of nav items\n+      let items = []; // nav items array\n+      let itemsCount = 0; // initial nav items count\n+      let hubNavWidth = $(window).width(); // initial width of the hubNav based on the window width\n+\n+      el.prepend(transclude());\n+\n+      var debounce = function (func, wait, immediate) {\n+      \tvar timeout;\n+      \treturn function() {\n+      \t\tvar context = this, args = arguments;\n+      \t\tvar later = function() {\n+      \t\t\ttimeout = null;\n+      \t\t\tif (!immediate) func.apply(context, args);\n+      \t\t};\n+      \t\tvar callNow = immediate && !timeout;\n+      \t\tclearTimeout(timeout);\n+      \t\ttimeout = setTimeout(later, wait);\n+      \t\tif (callNow) func.apply(context, args);\n+      \t};\n+      };\n+\n+      // this method recalculates different parameters which are required before every render iteration\n+      var updateConfig = function() {\n+        itemWidth = 60;\n+        hubNavWidth = $(window).width();\n+        itemsToShow = Math.floor(hubNavWidth / itemWidth);\n+        itemWidth = hubNavWidth / itemsToShow;\n+      };\n+\n+      var disableHubNav = function() {\n+        el.removeClass('navScrollActive');\n+        scope.$evalAsync(() => {\n+          scope.navScrollActive = false;\n+          scope.showPreviousArrow = false;\n+          scope.showNextArrow = false;\n+        });\n+        angular.forEach(items, function (item, index) {\n+            item.style['-webkit-transform'] =  null;\n+        });\n+      };\n+\n+      var render = function (isNavigated) {\n+        updateConfig();\n+        if(!window.mobileAndTabletcheck()) {\n+          if(!isNavigated) {\n+            slidePosition = 0;\n+          }\n+          el.addClass('hubNav');\n+          items = document.querySelectorAll('.hubNav .navItem:not(.ng-hide)');","path":"app/directives/hubNav/hubNav.directive.js","position":61,"original_position":61,"commit_id":"a0e8d95b4d0bc2833c95145710c8c8f72b56f556","original_commit_id":"a0e8d95b4d0bc2833c95145710c8c8f72b56f556","user":{"login":"albi34","id":6742170,"avatar_url":"https://avatars3.githubusercontent.com/u/6742170?v=3","gravatar_id":"","url":"https://api.github.com/users/albi34","html_url":"https://github.com/albi34","followers_url":"https://api.github.com/users/albi34/followers","following_url":"https://api.github.com/users/albi34/following{/other_user}","gists_url":"https://api.github.com/users/albi34/gists{/gist_id}","starred_url":"https://api.github.com/users/albi34/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albi34/subscriptions","organizations_url":"https://api.github.com/users/albi34/orgs","repos_url":"https://api.github.com/users/albi34/repos","events_url":"https://api.github.com/users/albi34/events{/privacy}","received_events_url":"https://api.github.com/users/albi34/received_events","type":"User","site_admin":false},"body":"I'd like to rely more on the data than on the rendered DOM, you can probably get the items length directly from the scope no ?","created_at":"2017-04-17T14:52:51Z","updated_at":"2017-04-17T14:59:31Z","html_url":"https://github.com/BroadsoftLabs/hubUi/pull/83#discussion_r111753003","pull_request_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/pulls/83","_links":{"self":{"href":"https://api.github.com/repos/BroadsoftLabs/hubUi/pulls/comments/111753003"},"html":{"href":"https://github.com/BroadsoftLabs/hubUi/pull/83#discussion_r111753003"},"pull_request":{"href":"https://api.github.com/repos/BroadsoftLabs/hubUi/pulls/83"}}},"pull_request":{"url":"https://api.github.com/repos/BroadsoftLabs/hubUi/pulls/83","id":116143601,"html_url":"https://github.com/BroadsoftLabs/hubUi/pull/83","diff_url":"https://github.com/BroadsoftLabs/hubUi/pull/83.diff","patch_url":"https://github.com/BroadsoftLabs/hubUi/pull/83.patch","issue_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/issues/83","number":83,"state":"open","locked":false,"title":"Am 2514 navbar issues","user":{"login":"amirmehmood","id":2733966,"avatar_url":"https://avatars0.githubusercontent.com/u/2733966?v=3","gravatar_id":"","url":"https://api.github.com/users/amirmehmood","html_url":"https://github.com/amirmehmood","followers_url":"https://api.github.com/users/amirmehmood/followers","following_url":"https://api.github.com/users/amirmehmood/following{/other_user}","gists_url":"https://api.github.com/users/amirmehmood/gists{/gist_id}","starred_url":"https://api.github.com/users/amirmehmood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amirmehmood/subscriptions","organizations_url":"https://api.github.com/users/amirmehmood/orgs","repos_url":"https://api.github.com/users/amirmehmood/repos","events_url":"https://api.github.com/users/amirmehmood/events{/privacy}","received_events_url":"https://api.github.com/users/amirmehmood/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-04-17T14:43:06Z","updated_at":"2017-04-17T14:59:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"61ad72cf468b39be83fcc0ac28a9a0210cc4c959","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/pulls/83/commits","review_comments_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/pulls/83/comments","review_comment_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/issues/83/comments","statuses_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/statuses/a0e8d95b4d0bc2833c95145710c8c8f72b56f556","head":{"label":"BroadsoftLabs:am-2514-navbar-issues","ref":"am-2514-navbar-issues","sha":"a0e8d95b4d0bc2833c95145710c8c8f72b56f556","user":{"login":"BroadsoftLabs","id":16388966,"avatar_url":"https://avatars3.githubusercontent.com/u/16388966?v=3","gravatar_id":"","url":"https://api.github.com/users/BroadsoftLabs","html_url":"https://github.com/BroadsoftLabs","followers_url":"https://api.github.com/users/BroadsoftLabs/followers","following_url":"https://api.github.com/users/BroadsoftLabs/following{/other_user}","gists_url":"https://api.github.com/users/BroadsoftLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/BroadsoftLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BroadsoftLabs/subscriptions","organizations_url":"https://api.github.com/users/BroadsoftLabs/orgs","repos_url":"https://api.github.com/users/BroadsoftLabs/repos","events_url":"https://api.github.com/users/BroadsoftLabs/events{/privacy}","received_events_url":"https://api.github.com/users/BroadsoftLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":62733573,"name":"hubUi","full_name":"BroadsoftLabs/hubUi","owner":{"login":"BroadsoftLabs","id":16388966,"avatar_url":"https://avatars3.githubusercontent.com/u/16388966?v=3","gravatar_id":"","url":"https://api.github.com/users/BroadsoftLabs","html_url":"https://github.com/BroadsoftLabs","followers_url":"https://api.github.com/users/BroadsoftLabs/followers","following_url":"https://api.github.com/users/BroadsoftLabs/following{/other_user}","gists_url":"https://api.github.com/users/BroadsoftLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/BroadsoftLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BroadsoftLabs/subscriptions","organizations_url":"https://api.github.com/users/BroadsoftLabs/orgs","repos_url":"https://api.github.com/users/BroadsoftLabs/repos","events_url":"https://api.github.com/users/BroadsoftLabs/events{/privacy}","received_events_url":"https://api.github.com/users/BroadsoftLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BroadsoftLabs/hubUi","description":null,"fork":false,"url":"https://api.github.com/repos/BroadsoftLabs/hubUi","forks_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/forks","keys_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/teams","hooks_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/hooks","issue_events_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/issues/events{/number}","events_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/events","assignees_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/assignees{/user}","branches_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/branches{/branch}","tags_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/tags","blobs_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/git/refs{/sha}","trees_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/statuses/{sha}","languages_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/languages","stargazers_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/stargazers","contributors_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/contributors","subscribers_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/subscribers","subscription_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/subscription","commits_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/commits{/sha}","git_commits_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/git/commits{/sha}","comments_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/comments{/number}","issue_comment_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/issues/comments{/number}","contents_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/contents/{+path}","compare_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/merges","archive_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/downloads","issues_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/issues{/number}","pulls_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/pulls{/number}","milestones_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/milestones{/number}","notifications_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/labels{/name}","releases_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/releases{/id}","deployments_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/deployments","created_at":"2016-07-06T15:47:52Z","updated_at":"2017-03-27T14:40:59Z","pushed_at":"2017-04-17T14:43:07Z","git_url":"git://github.com/BroadsoftLabs/hubUi.git","ssh_url":"git@github.com:BroadsoftLabs/hubUi.git","clone_url":"https://github.com/BroadsoftLabs/hubUi.git","svn_url":"https://github.com/BroadsoftLabs/hubUi","homepage":null,"size":326,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_projects":true,"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":"BroadsoftLabs:master","ref":"master","sha":"eed22668201178faa5a71944378a706224d9f0c6","user":{"login":"BroadsoftLabs","id":16388966,"avatar_url":"https://avatars3.githubusercontent.com/u/16388966?v=3","gravatar_id":"","url":"https://api.github.com/users/BroadsoftLabs","html_url":"https://github.com/BroadsoftLabs","followers_url":"https://api.github.com/users/BroadsoftLabs/followers","following_url":"https://api.github.com/users/BroadsoftLabs/following{/other_user}","gists_url":"https://api.github.com/users/BroadsoftLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/BroadsoftLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BroadsoftLabs/subscriptions","organizations_url":"https://api.github.com/users/BroadsoftLabs/orgs","repos_url":"https://api.github.com/users/BroadsoftLabs/repos","events_url":"https://api.github.com/users/BroadsoftLabs/events{/privacy}","received_events_url":"https://api.github.com/users/BroadsoftLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":62733573,"name":"hubUi","full_name":"BroadsoftLabs/hubUi","owner":{"login":"BroadsoftLabs","id":16388966,"avatar_url":"https://avatars3.githubusercontent.com/u/16388966?v=3","gravatar_id":"","url":"https://api.github.com/users/BroadsoftLabs","html_url":"https://github.com/BroadsoftLabs","followers_url":"https://api.github.com/users/BroadsoftLabs/followers","following_url":"https://api.github.com/users/BroadsoftLabs/following{/other_user}","gists_url":"https://api.github.com/users/BroadsoftLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/BroadsoftLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BroadsoftLabs/subscriptions","organizations_url":"https://api.github.com/users/BroadsoftLabs/orgs","repos_url":"https://api.github.com/users/BroadsoftLabs/repos","events_url":"https://api.github.com/users/BroadsoftLabs/events{/privacy}","received_events_url":"https://api.github.com/users/BroadsoftLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BroadsoftLabs/hubUi","description":null,"fork":false,"url":"https://api.github.com/repos/BroadsoftLabs/hubUi","forks_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/forks","keys_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/teams","hooks_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/hooks","issue_events_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/issues/events{/number}","events_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/events","assignees_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/assignees{/user}","branches_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/branches{/branch}","tags_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/tags","blobs_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/git/refs{/sha}","trees_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/statuses/{sha}","languages_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/languages","stargazers_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/stargazers","contributors_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/contributors","subscribers_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/subscribers","subscription_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/subscription","commits_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/commits{/sha}","git_commits_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/git/commits{/sha}","comments_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/comments{/number}","issue_comment_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/issues/comments{/number}","contents_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/contents/{+path}","compare_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/merges","archive_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/downloads","issues_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/issues{/number}","pulls_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/pulls{/number}","milestones_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/milestones{/number}","notifications_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/labels{/name}","releases_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/releases{/id}","deployments_url":"https://api.github.com/repos/BroadsoftLabs/hubUi/deployments","created_at":"2016-07-06T15:47:52Z","updated_at":"2017-03-27T14:40:59Z","pushed_at":"2017-04-17T14:43:07Z","git_url":"git://github.com/BroadsoftLabs/hubUi.git","ssh_url":"git@github.com:BroadsoftLabs/hubUi.git","clone_url":"https://github.com/BroadsoftLabs/hubUi.git","svn_url":"https://github.com/BroadsoftLabs/hubUi","homepage":null,"size":326,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_projects":true,"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/BroadsoftLabs/hubUi/pulls/83"},"html":{"href":"https://github.com/BroadsoftLabs/hubUi/pull/83"},"issue":{"href":"https://api.github.com/repos/BroadsoftLabs/hubUi/issues/83"},"comments":{"href":"https://api.github.com/repos/BroadsoftLabs/hubUi/issues/83/comments"},"review_comments":{"href":"https://api.github.com/repos/BroadsoftLabs/hubUi/pulls/83/comments"},"review_comment":{"href":"https://api.github.com/repos/BroadsoftLabs/hubUi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BroadsoftLabs/hubUi/pulls/83/commits"},"statuses":{"href":"https://api.github.com/repos/BroadsoftLabs/hubUi/statuses/a0e8d95b4d0bc2833c95145710c8c8f72b56f556"}}}}
{"actor":{"display_login":"albi34"}}