{"action":"created","comment":{"url":"https://api.github.com/repos/angular/material/pulls/comments/30363154","id":30363154,"diff_hunk":"@@ -0,0 +1,134 @@\n+(function() {\n+  'use strict';\n+\n+  angular\n+    .module('material.components.fabToolbar', [])\n+    .directive('mdFabToolbar', MdFabToolbarDirective);\n+\n+  /**\n+   * @ngdoc directive\n+   * @name mdFabToolbar\n+   * @module material.components.fabToolbar\n+   *\n+   * @restrict E\n+   *\n+   * @description\n+   *\n+   * The `<md-fab-toolbar>` directive is used present a toolbar of elements (usually `<md-button>`s) for quick access to\n+   * common actions when a floating action button is activated (via hover or keyboard navigation).\n+   *\n+   * @usage\n+   *\n+   * <hljs lang=\"html\">\n+   * <md-fab-toolbar>\n+   *   <md-fab-trigger>\n+   *     <md-button><md-icon icon=\"/img/icons/plus.svg\"></md-icon></md-button>\n+   *   </md-fab-trigger>\n+   *\n+   *   <md-fab-actions>\n+   *     <md-button><md-icon icon=\"/img/icons/user.svg\"></md-icon></md-button>\n+   *     <md-button><md-icon icon=\"/img/icons/group.svg\"></md-icon></md-button>\n+   *   </md-fab-actions>\n+   * </md-fab-toolbar>\n+   * </hljs>\n+   *\n+   * @param {expression=} md-open Programmatically control whether or not the toolbar is visible.\n+   */\n+  function MdFabToolbarDirective($timeout) {\n+    return {\n+      restrict: 'E',\n+      transclude: true,\n+      template: [\n+        '<div class=\"md-fab-toolbar-wrapper\">',\n+        '  <div class=\"md-fab-toolbar-background\"></div>',\n+        '  <div ng-transclude></div>',\n+        '</div>'\n+      ].join('\\n'),\n+\n+      scope: {\n+        isOpen: '=?mdOpen',\n+      },\n+\n+      controller: controller,\n+\n+      link: link\n+    };\n+\n+    function controller($scope, $element) {\n+      var vm = this;\n+\n+      // Set the default to be closed\n+      if (typeof $scope.isOpen === 'undefined') {\n+        $scope.isOpen = false;\n+      }\n+\n+      vm.focus = function() {\n+        // TODO: Why does this need to be inside a $timeout???\n+        $timeout(function() {\n+          $scope.isOpen = true;\n+        });\n+      };\n+\n+      vm.blur = function() {\n+        $timeout(function() {\n+          $scope.isOpen = false;\n+        });\n+      };\n+    }\n+\n+    function link($scope, $element, $attriubutes, ctrl) {\n+      var i, focusable, child, children = [], types = ['button', 'a'];\n+\n+      children = $element.find(\"button\");\n+      //children = children.concat($element.find(\"a\"));\n+\n+      // Add some focus/blur events to whatever (post-compiled) elements the user added in the toolbar\n+      for (i = 0; i < children.length; i++) {\n+        focusable = children.eq(i);\n+\n+        focusable.on('focus', ctrl.focus);\n+        focusable.on('blur', ctrl.blur);\n+      }\n+\n+      $element.on('mouseenter', ctrl.focus);\n+      $element.on('mouseleave', ctrl.blur);\n+\n+      // Don't allow focus on the trigger\n+      $element.find('md-fab-trigger').find('button').attr('tabindex', '-1');\n+\n+      // Watch for changes to md-open\n+      $scope.$watch('isOpen', function(isOpen) {\n+        // Grab the elements\n+        var backgroundElement = $element.children().eq(0).children().eq(0)[0];\n+        var triggerElement = $element.children().eq(0).children().eq(1).children().eq(0)[0];\n+\n+        // If we find both elements, use them to position the new backgroundt co\n+        if (triggerElement && backgroundElement) {\n+          // Get our variables\n+          var width = $element[0].offsetWidth;\n+          var height = $element[0].offsetHeight;\n+\n+          // Make a square\n+          var scaleWidth = width * 2;\n+          var scaleHeight = width * 2;\n+\n+          // Set the positioning and border\n+          var borderRadius = width;","path":"src/components/fabToolbar/fabToolbar.js","position":116,"original_position":116,"commit_id":"31bff294108a056a681cfef63a365863723a2efd","original_commit_id":"31bff294108a056a681cfef63a365863723a2efd","user":{"login":"topherfangio","id":54370,"avatar_url":"https://avatars.githubusercontent.com/u/54370?v=3","gravatar_id":"","url":"https://api.github.com/users/topherfangio","html_url":"https://github.com/topherfangio","followers_url":"https://api.github.com/users/topherfangio/followers","following_url":"https://api.github.com/users/topherfangio/following{/other_user}","gists_url":"https://api.github.com/users/topherfangio/gists{/gist_id}","starred_url":"https://api.github.com/users/topherfangio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/topherfangio/subscriptions","organizations_url":"https://api.github.com/users/topherfangio/orgs","repos_url":"https://api.github.com/users/topherfangio/repos","events_url":"https://api.github.com/users/topherfangio/events{/privacy}","received_events_url":"https://api.github.com/users/topherfangio/received_events","type":"User","site_admin":false},"body":"Can you explain why the border radius is not needed? In the animation video on the design spec, it clearly shows (okay, semi-clearly shows; I had to play/pause the animation about 20 times to see it) a rounded edge as the toolbar appears.","created_at":"2015-05-14T21:08:22Z","updated_at":"2015-05-14T21:08:22Z","html_url":"https://github.com/angular/material/pull/2842#discussion_r30363154","pull_request_url":"https://api.github.com/repos/angular/material/pulls/2842","_links":{"self":{"href":"https://api.github.com/repos/angular/material/pulls/comments/30363154"},"html":{"href":"https://github.com/angular/material/pull/2842#discussion_r30363154"},"pull_request":{"href":"https://api.github.com/repos/angular/material/pulls/2842"}}},"pull_request":{"url":"https://api.github.com/repos/angular/material/pulls/2842","id":35372911,"html_url":"https://github.com/angular/material/pull/2842","diff_url":"https://github.com/angular/material/pull/2842.diff","patch_url":"https://github.com/angular/material/pull/2842.patch","issue_url":"https://api.github.com/repos/angular/material/issues/2842","number":2842,"state":"open","locked":false,"title":"Add FAB Speed Dial and FAB Toolbar components.","user":{"login":"topherfangio","id":54370,"avatar_url":"https://avatars.githubusercontent.com/u/54370?v=3","gravatar_id":"","url":"https://api.github.com/users/topherfangio","html_url":"https://github.com/topherfangio","followers_url":"https://api.github.com/users/topherfangio/followers","following_url":"https://api.github.com/users/topherfangio/following{/other_user}","gists_url":"https://api.github.com/users/topherfangio/gists{/gist_id}","starred_url":"https://api.github.com/users/topherfangio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/topherfangio/subscriptions","organizations_url":"https://api.github.com/users/topherfangio/orgs","repos_url":"https://api.github.com/users/topherfangio/repos","events_url":"https://api.github.com/users/topherfangio/events{/privacy}","received_events_url":"https://api.github.com/users/topherfangio/received_events","type":"User","site_admin":false},"body":"Fixes #1416 - Adds the Floating Action Button Speed Dial and Toolbar components.\r\n\r\nCLA has been signed under Profoundry LLC.\r\n\r\nPlease let me know if you need any changes! :-)","created_at":"2015-05-13T21:30:53Z","updated_at":"2015-05-14T21:08:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e7bcd3c4501b5222fc92bf2a2db5ac0b56af0127","assignee":{"login":"ThomasBurleson","id":210413,"avatar_url":"https://avatars.githubusercontent.com/u/210413?v=3","gravatar_id":"","url":"https://api.github.com/users/ThomasBurleson","html_url":"https://github.com/ThomasBurleson","followers_url":"https://api.github.com/users/ThomasBurleson/followers","following_url":"https://api.github.com/users/ThomasBurleson/following{/other_user}","gists_url":"https://api.github.com/users/ThomasBurleson/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomasBurleson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomasBurleson/subscriptions","organizations_url":"https://api.github.com/users/ThomasBurleson/orgs","repos_url":"https://api.github.com/users/ThomasBurleson/repos","events_url":"https://api.github.com/users/ThomasBurleson/events{/privacy}","received_events_url":"https://api.github.com/users/ThomasBurleson/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/angular/material/milestones/15","html_url":"https://github.com/angular/material/milestones/0.10.0","labels_url":"https://api.github.com/repos/angular/material/milestones/15/labels","id":958568,"number":15,"title":"0.10.0","description":"### Component Features\r\n\r\n- DateTimepicker\r\n- SpeedDial\r\n- Menu\r\n- Chips (cont.)\r\n- Slider range\r\n- textfields\r\n  *  `<md-text-search>`\r\n- bi-directional support (cont.)\r\n\r\n### Additional Efforts\r\n\r\nProvide 'Edit on CodePen'\r\nProvide Version Picker and Documentation locking to specific builds/releases\r\nBuild tool to supports selection of icons and svgs to bundle.\r\n\r\n\r\n","creator":{"login":"ThomasBurleson","id":210413,"avatar_url":"https://avatars.githubusercontent.com/u/210413?v=3","gravatar_id":"","url":"https://api.github.com/users/ThomasBurleson","html_url":"https://github.com/ThomasBurleson","followers_url":"https://api.github.com/users/ThomasBurleson/followers","following_url":"https://api.github.com/users/ThomasBurleson/following{/other_user}","gists_url":"https://api.github.com/users/ThomasBurleson/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomasBurleson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomasBurleson/subscriptions","organizations_url":"https://api.github.com/users/ThomasBurleson/orgs","repos_url":"https://api.github.com/users/ThomasBurleson/repos","events_url":"https://api.github.com/users/ThomasBurleson/events{/privacy}","received_events_url":"https://api.github.com/users/ThomasBurleson/received_events","type":"User","site_admin":false},"open_issues":377,"closed_issues":85,"state":"open","created_at":"2015-01-30T17:00:57Z","updated_at":"2015-05-14T17:59:29Z","due_on":"2015-05-26T05:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/angular/material/pulls/2842/commits","review_comments_url":"https://api.github.com/repos/angular/material/pulls/2842/comments","review_comment_url":"https://api.github.com/repos/angular/material/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/material/issues/2842/comments","statuses_url":"https://api.github.com/repos/angular/material/statuses/31bff294108a056a681cfef63a365863723a2efd","head":{"label":"profoundry-us:contrib/md-fab-speed-dial","ref":"contrib/md-fab-speed-dial","sha":"31bff294108a056a681cfef63a365863723a2efd","user":{"login":"profoundry-us","id":331029,"avatar_url":"https://avatars.githubusercontent.com/u/331029?v=3","gravatar_id":"","url":"https://api.github.com/users/profoundry-us","html_url":"https://github.com/profoundry-us","followers_url":"https://api.github.com/users/profoundry-us/followers","following_url":"https://api.github.com/users/profoundry-us/following{/other_user}","gists_url":"https://api.github.com/users/profoundry-us/gists{/gist_id}","starred_url":"https://api.github.com/users/profoundry-us/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/profoundry-us/subscriptions","organizations_url":"https://api.github.com/users/profoundry-us/orgs","repos_url":"https://api.github.com/users/profoundry-us/repos","events_url":"https://api.github.com/users/profoundry-us/events{/privacy}","received_events_url":"https://api.github.com/users/profoundry-us/received_events","type":"Organization","site_admin":false},"repo":{"id":34092368,"name":"material","full_name":"profoundry-us/material","owner":{"login":"profoundry-us","id":331029,"avatar_url":"https://avatars.githubusercontent.com/u/331029?v=3","gravatar_id":"","url":"https://api.github.com/users/profoundry-us","html_url":"https://github.com/profoundry-us","followers_url":"https://api.github.com/users/profoundry-us/followers","following_url":"https://api.github.com/users/profoundry-us/following{/other_user}","gists_url":"https://api.github.com/users/profoundry-us/gists{/gist_id}","starred_url":"https://api.github.com/users/profoundry-us/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/profoundry-us/subscriptions","organizations_url":"https://api.github.com/users/profoundry-us/orgs","repos_url":"https://api.github.com/users/profoundry-us/repos","events_url":"https://api.github.com/users/profoundry-us/events{/privacy}","received_events_url":"https://api.github.com/users/profoundry-us/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/profoundry-us/material","description":"Material design for Angular","fork":true,"url":"https://api.github.com/repos/profoundry-us/material","forks_url":"https://api.github.com/repos/profoundry-us/material/forks","keys_url":"https://api.github.com/repos/profoundry-us/material/keys{/key_id}","collaborators_url":"https://api.github.com/repos/profoundry-us/material/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/profoundry-us/material/teams","hooks_url":"https://api.github.com/repos/profoundry-us/material/hooks","issue_events_url":"https://api.github.com/repos/profoundry-us/material/issues/events{/number}","events_url":"https://api.github.com/repos/profoundry-us/material/events","assignees_url":"https://api.github.com/repos/profoundry-us/material/assignees{/user}","branches_url":"https://api.github.com/repos/profoundry-us/material/branches{/branch}","tags_url":"https://api.github.com/repos/profoundry-us/material/tags","blobs_url":"https://api.github.com/repos/profoundry-us/material/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/profoundry-us/material/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/profoundry-us/material/git/refs{/sha}","trees_url":"https://api.github.com/repos/profoundry-us/material/git/trees{/sha}","statuses_url":"https://api.github.com/repos/profoundry-us/material/statuses/{sha}","languages_url":"https://api.github.com/repos/profoundry-us/material/languages","stargazers_url":"https://api.github.com/repos/profoundry-us/material/stargazers","contributors_url":"https://api.github.com/repos/profoundry-us/material/contributors","subscribers_url":"https://api.github.com/repos/profoundry-us/material/subscribers","subscription_url":"https://api.github.com/repos/profoundry-us/material/subscription","commits_url":"https://api.github.com/repos/profoundry-us/material/commits{/sha}","git_commits_url":"https://api.github.com/repos/profoundry-us/material/git/commits{/sha}","comments_url":"https://api.github.com/repos/profoundry-us/material/comments{/number}","issue_comment_url":"https://api.github.com/repos/profoundry-us/material/issues/comments{/number}","contents_url":"https://api.github.com/repos/profoundry-us/material/contents/{+path}","compare_url":"https://api.github.com/repos/profoundry-us/material/compare/{base}...{head}","merges_url":"https://api.github.com/repos/profoundry-us/material/merges","archive_url":"https://api.github.com/repos/profoundry-us/material/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/profoundry-us/material/downloads","issues_url":"https://api.github.com/repos/profoundry-us/material/issues{/number}","pulls_url":"https://api.github.com/repos/profoundry-us/material/pulls{/number}","milestones_url":"https://api.github.com/repos/profoundry-us/material/milestones{/number}","notifications_url":"https://api.github.com/repos/profoundry-us/material/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/profoundry-us/material/labels{/name}","releases_url":"https://api.github.com/repos/profoundry-us/material/releases{/id}","created_at":"2015-04-17T02:33:20Z","updated_at":"2015-04-17T02:33:22Z","pushed_at":"2015-05-14T20:40:51Z","git_url":"git://github.com/profoundry-us/material.git","ssh_url":"git@github.com:profoundry-us/material.git","clone_url":"https://github.com/profoundry-us/material.git","svn_url":"https://github.com/profoundry-us/material","homepage":"https://material.angularjs.org/","size":36681,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"angular:master","ref":"master","sha":"8e512bbfea46e178b610db50f9ea05e5ab075894","user":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":21399598,"name":"material","full_name":"angular/material","owner":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/material","description":"Material design for Angular","fork":false,"url":"https://api.github.com/repos/angular/material","forks_url":"https://api.github.com/repos/angular/material/forks","keys_url":"https://api.github.com/repos/angular/material/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/material/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/material/teams","hooks_url":"https://api.github.com/repos/angular/material/hooks","issue_events_url":"https://api.github.com/repos/angular/material/issues/events{/number}","events_url":"https://api.github.com/repos/angular/material/events","assignees_url":"https://api.github.com/repos/angular/material/assignees{/user}","branches_url":"https://api.github.com/repos/angular/material/branches{/branch}","tags_url":"https://api.github.com/repos/angular/material/tags","blobs_url":"https://api.github.com/repos/angular/material/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/material/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/material/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/material/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/material/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/material/languages","stargazers_url":"https://api.github.com/repos/angular/material/stargazers","contributors_url":"https://api.github.com/repos/angular/material/contributors","subscribers_url":"https://api.github.com/repos/angular/material/subscribers","subscription_url":"https://api.github.com/repos/angular/material/subscription","commits_url":"https://api.github.com/repos/angular/material/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/material/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/material/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/material/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/material/contents/{+path}","compare_url":"https://api.github.com/repos/angular/material/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/material/merges","archive_url":"https://api.github.com/repos/angular/material/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/material/downloads","issues_url":"https://api.github.com/repos/angular/material/issues{/number}","pulls_url":"https://api.github.com/repos/angular/material/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/material/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/material/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/material/labels{/name}","releases_url":"https://api.github.com/repos/angular/material/releases{/id}","created_at":"2014-07-01T19:20:06Z","updated_at":"2015-05-14T19:49:44Z","pushed_at":"2015-05-14T20:40:52Z","git_url":"git://github.com/angular/material.git","ssh_url":"git@github.com:angular/material.git","clone_url":"https://github.com/angular/material.git","svn_url":"https://github.com/angular/material","homepage":"https://material.angularjs.org/","size":89075,"stargazers_count":8328,"watchers_count":8328,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1255,"mirror_url":null,"open_issues_count":628,"forks":1255,"open_issues":628,"watchers":8328,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/material/pulls/2842"},"html":{"href":"https://github.com/angular/material/pull/2842"},"issue":{"href":"https://api.github.com/repos/angular/material/issues/2842"},"comments":{"href":"https://api.github.com/repos/angular/material/issues/2842/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/material/pulls/2842/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/material/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/material/pulls/2842/commits"},"statuses":{"href":"https://api.github.com/repos/angular/material/statuses/31bff294108a056a681cfef63a365863723a2efd"}}}}