{"action":"created","comment":{"url":"https://api.github.com/repos/LLK/scratch-blocks/pulls/comments/67056527","id":67056527,"diff_hunk":"@@ -166,6 +166,38 @@ Blockly.DropDownDiv.setColour = function(backgroundColour, borderColour) {\n };\n \n /**\n+ * Shortcut to show and place the drop-down with positioning determined\n+ * by a particular block. The primary position will be below the block,\n+ * and the secondary position above the block. Drop-down will be\n+ * constrained to the block's workspace.\n+ * @param {Object} owner The object showing the drop-down\n+ * @param {!Blockly.Block} block Block to position the drop-down around.\n+ * @param {Function=} opt_onHide Optional callback for when the drop-down is hidden.\n+ * @param {Number} opt_secondaryYOffset Optional Y offset for above-block positioning.\n+ * @return {boolean} True if the menu rendered below block; false if above.\n+ */\n+Blockly.DropDownDiv.showPositionedByBlock = function(owner, block,\n+      opt_onHide, opt_secondaryYOffset) {\n+  var scale = block.workspace.scale;\n+  var bBox = block.getHeightWidth();\n+  bBox.width *= scale;","path":"core/dropdowndiv.js","position":18,"original_position":18,"commit_id":"1b210b4ba86524051d3d77f3e0364eff649367e7","original_commit_id":"1b210b4ba86524051d3d77f3e0364eff649367e7","user":{"login":"tmickel","id":120403,"avatar_url":"https://avatars.githubusercontent.com/u/120403?v=3","gravatar_id":"","url":"https://api.github.com/users/tmickel","html_url":"https://github.com/tmickel","followers_url":"https://api.github.com/users/tmickel/followers","following_url":"https://api.github.com/users/tmickel/following{/other_user}","gists_url":"https://api.github.com/users/tmickel/gists{/gist_id}","starred_url":"https://api.github.com/users/tmickel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmickel/subscriptions","organizations_url":"https://api.github.com/users/tmickel/orgs","repos_url":"https://api.github.com/users/tmickel/repos","events_url":"https://api.github.com/users/tmickel/events{/privacy}","received_events_url":"https://api.github.com/users/tmickel/received_events","type":"User","site_admin":false},"body":"getHeightWidth() calculates based on `block.width` and `block.height`, which are properties calculated by the render methods, pre-scale. I could make a function to return the scaled width and height, but not sure if there are many other use-cases other than this one...","created_at":"2016-06-14T21:03:27Z","updated_at":"2016-06-14T21:03:27Z","html_url":"https://github.com/LLK/scratch-blocks/pull/407#discussion_r67056527","pull_request_url":"https://api.github.com/repos/LLK/scratch-blocks/pulls/407","_links":{"self":{"href":"https://api.github.com/repos/LLK/scratch-blocks/pulls/comments/67056527"},"html":{"href":"https://github.com/LLK/scratch-blocks/pull/407#discussion_r67056527"},"pull_request":{"href":"https://api.github.com/repos/LLK/scratch-blocks/pulls/407"}}},"pull_request":{"url":"https://api.github.com/repos/LLK/scratch-blocks/pulls/407","id":73746541,"html_url":"https://github.com/LLK/scratch-blocks/pull/407","diff_url":"https://github.com/LLK/scratch-blocks/pull/407.diff","patch_url":"https://github.com/LLK/scratch-blocks/pull/407.patch","issue_url":"https://api.github.com/repos/LLK/scratch-blocks/issues/407","number":407,"state":"open","locked":false,"title":"Straw-man implementation of text drop-downs","user":{"login":"tmickel","id":120403,"avatar_url":"https://avatars.githubusercontent.com/u/120403?v=3","gravatar_id":"","url":"https://api.github.com/users/tmickel","html_url":"https://github.com/tmickel","followers_url":"https://api.github.com/users/tmickel/followers","following_url":"https://api.github.com/users/tmickel/following{/other_user}","gists_url":"https://api.github.com/users/tmickel/gists{/gist_id}","starred_url":"https://api.github.com/users/tmickel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmickel/subscriptions","organizations_url":"https://api.github.com/users/tmickel/orgs","repos_url":"https://api.github.com/users/tmickel/repos","events_url":"https://api.github.com/users/tmickel/events{/privacy}","received_events_url":"https://api.github.com/users/tmickel/received_events","type":"User","site_admin":false},"body":"- Update DropDownDiv to include the logic for positioning by block.\r\n- Update field_dropdown to use DropDownDiv instead of WidgetDiv.\r\n- Update CSS so goog-menus are styled in DropDownDivs as well as WidgetDivs (mostly a copy-paste job).\r\n\r\nPreviews:\r\n<img width=\"285\" alt=\"screen shot 2016-06-14 at 10 07 53 am\" src=\"https://cloud.githubusercontent.com/assets/120403/16045766/e82e9b1c-3217-11e6-9a0f-55c554b610f2.png\">\r\n<img width=\"239\" alt=\"screen shot 2016-06-14 at 10 07 46 am\" src=\"https://cloud.githubusercontent.com/assets/120403/16045768/e9779582-3217-11e6-950d-f850ace73227.png\">\r\n<img width=\"336\" alt=\"screen shot 2016-06-14 at 10 03 07 am\" src=\"https://cloud.githubusercontent.com/assets/120403/16045769/eb8511d8-3217-11e6-85f4-adff4f305da1.png\">\r\n","created_at":"2016-06-14T14:08:51Z","updated_at":"2016-06-14T21:03:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"94915a1ef65b649145b81b67a466e7e911d425ae","assignee":{"login":"rachel-fenichel","id":13686399,"avatar_url":"https://avatars.githubusercontent.com/u/13686399?v=3","gravatar_id":"","url":"https://api.github.com/users/rachel-fenichel","html_url":"https://github.com/rachel-fenichel","followers_url":"https://api.github.com/users/rachel-fenichel/followers","following_url":"https://api.github.com/users/rachel-fenichel/following{/other_user}","gists_url":"https://api.github.com/users/rachel-fenichel/gists{/gist_id}","starred_url":"https://api.github.com/users/rachel-fenichel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rachel-fenichel/subscriptions","organizations_url":"https://api.github.com/users/rachel-fenichel/orgs","repos_url":"https://api.github.com/users/rachel-fenichel/repos","events_url":"https://api.github.com/users/rachel-fenichel/events{/privacy}","received_events_url":"https://api.github.com/users/rachel-fenichel/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/LLK/scratch-blocks/pulls/407/commits","review_comments_url":"https://api.github.com/repos/LLK/scratch-blocks/pulls/407/comments","review_comment_url":"https://api.github.com/repos/LLK/scratch-blocks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/LLK/scratch-blocks/issues/407/comments","statuses_url":"https://api.github.com/repos/LLK/scratch-blocks/statuses/1b210b4ba86524051d3d77f3e0364eff649367e7","head":{"label":"tmickel:feature/dropdown-menus","ref":"feature/dropdown-menus","sha":"1b210b4ba86524051d3d77f3e0364eff649367e7","user":{"login":"tmickel","id":120403,"avatar_url":"https://avatars.githubusercontent.com/u/120403?v=3","gravatar_id":"","url":"https://api.github.com/users/tmickel","html_url":"https://github.com/tmickel","followers_url":"https://api.github.com/users/tmickel/followers","following_url":"https://api.github.com/users/tmickel/following{/other_user}","gists_url":"https://api.github.com/users/tmickel/gists{/gist_id}","starred_url":"https://api.github.com/users/tmickel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmickel/subscriptions","organizations_url":"https://api.github.com/users/tmickel/orgs","repos_url":"https://api.github.com/users/tmickel/repos","events_url":"https://api.github.com/users/tmickel/events{/privacy}","received_events_url":"https://api.github.com/users/tmickel/received_events","type":"User","site_admin":false},"repo":{"id":59504620,"name":"scratch-blocks","full_name":"tmickel/scratch-blocks","owner":{"login":"tmickel","id":120403,"avatar_url":"https://avatars.githubusercontent.com/u/120403?v=3","gravatar_id":"","url":"https://api.github.com/users/tmickel","html_url":"https://github.com/tmickel","followers_url":"https://api.github.com/users/tmickel/followers","following_url":"https://api.github.com/users/tmickel/following{/other_user}","gists_url":"https://api.github.com/users/tmickel/gists{/gist_id}","starred_url":"https://api.github.com/users/tmickel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmickel/subscriptions","organizations_url":"https://api.github.com/users/tmickel/orgs","repos_url":"https://api.github.com/users/tmickel/repos","events_url":"https://api.github.com/users/tmickel/events{/privacy}","received_events_url":"https://api.github.com/users/tmickel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tmickel/scratch-blocks","description":"Scratch Blocks is a library for building creative computing interfaces.","fork":true,"url":"https://api.github.com/repos/tmickel/scratch-blocks","forks_url":"https://api.github.com/repos/tmickel/scratch-blocks/forks","keys_url":"https://api.github.com/repos/tmickel/scratch-blocks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tmickel/scratch-blocks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tmickel/scratch-blocks/teams","hooks_url":"https://api.github.com/repos/tmickel/scratch-blocks/hooks","issue_events_url":"https://api.github.com/repos/tmickel/scratch-blocks/issues/events{/number}","events_url":"https://api.github.com/repos/tmickel/scratch-blocks/events","assignees_url":"https://api.github.com/repos/tmickel/scratch-blocks/assignees{/user}","branches_url":"https://api.github.com/repos/tmickel/scratch-blocks/branches{/branch}","tags_url":"https://api.github.com/repos/tmickel/scratch-blocks/tags","blobs_url":"https://api.github.com/repos/tmickel/scratch-blocks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tmickel/scratch-blocks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tmickel/scratch-blocks/git/refs{/sha}","trees_url":"https://api.github.com/repos/tmickel/scratch-blocks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tmickel/scratch-blocks/statuses/{sha}","languages_url":"https://api.github.com/repos/tmickel/scratch-blocks/languages","stargazers_url":"https://api.github.com/repos/tmickel/scratch-blocks/stargazers","contributors_url":"https://api.github.com/repos/tmickel/scratch-blocks/contributors","subscribers_url":"https://api.github.com/repos/tmickel/scratch-blocks/subscribers","subscription_url":"https://api.github.com/repos/tmickel/scratch-blocks/subscription","commits_url":"https://api.github.com/repos/tmickel/scratch-blocks/commits{/sha}","git_commits_url":"https://api.github.com/repos/tmickel/scratch-blocks/git/commits{/sha}","comments_url":"https://api.github.com/repos/tmickel/scratch-blocks/comments{/number}","issue_comment_url":"https://api.github.com/repos/tmickel/scratch-blocks/issues/comments{/number}","contents_url":"https://api.github.com/repos/tmickel/scratch-blocks/contents/{+path}","compare_url":"https://api.github.com/repos/tmickel/scratch-blocks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tmickel/scratch-blocks/merges","archive_url":"https://api.github.com/repos/tmickel/scratch-blocks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tmickel/scratch-blocks/downloads","issues_url":"https://api.github.com/repos/tmickel/scratch-blocks/issues{/number}","pulls_url":"https://api.github.com/repos/tmickel/scratch-blocks/pulls{/number}","milestones_url":"https://api.github.com/repos/tmickel/scratch-blocks/milestones{/number}","notifications_url":"https://api.github.com/repos/tmickel/scratch-blocks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tmickel/scratch-blocks/labels{/name}","releases_url":"https://api.github.com/repos/tmickel/scratch-blocks/releases{/id}","deployments_url":"https://api.github.com/repos/tmickel/scratch-blocks/deployments","created_at":"2016-05-23T17:35:22Z","updated_at":"2016-05-23T17:35:25Z","pushed_at":"2016-06-14T20:34:27Z","git_url":"git://github.com/tmickel/scratch-blocks.git","ssh_url":"git@github.com:tmickel/scratch-blocks.git","clone_url":"https://github.com/tmickel/scratch-blocks.git","svn_url":"https://github.com/tmickel/scratch-blocks","homepage":"https://scratch.mit.edu/developers","size":54273,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"develop"}},"base":{"label":"LLK:develop","ref":"develop","sha":"85578d8c7c42956d656000e89034a444633c84f5","user":{"login":"LLK","id":3420800,"avatar_url":"https://avatars.githubusercontent.com/u/3420800?v=3","gravatar_id":"","url":"https://api.github.com/users/LLK","html_url":"https://github.com/LLK","followers_url":"https://api.github.com/users/LLK/followers","following_url":"https://api.github.com/users/LLK/following{/other_user}","gists_url":"https://api.github.com/users/LLK/gists{/gist_id}","starred_url":"https://api.github.com/users/LLK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LLK/subscriptions","organizations_url":"https://api.github.com/users/LLK/orgs","repos_url":"https://api.github.com/users/LLK/repos","events_url":"https://api.github.com/users/LLK/events{/privacy}","received_events_url":"https://api.github.com/users/LLK/received_events","type":"Organization","site_admin":false},"repo":{"id":49213884,"name":"scratch-blocks","full_name":"LLK/scratch-blocks","owner":{"login":"LLK","id":3420800,"avatar_url":"https://avatars.githubusercontent.com/u/3420800?v=3","gravatar_id":"","url":"https://api.github.com/users/LLK","html_url":"https://github.com/LLK","followers_url":"https://api.github.com/users/LLK/followers","following_url":"https://api.github.com/users/LLK/following{/other_user}","gists_url":"https://api.github.com/users/LLK/gists{/gist_id}","starred_url":"https://api.github.com/users/LLK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LLK/subscriptions","organizations_url":"https://api.github.com/users/LLK/orgs","repos_url":"https://api.github.com/users/LLK/repos","events_url":"https://api.github.com/users/LLK/events{/privacy}","received_events_url":"https://api.github.com/users/LLK/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LLK/scratch-blocks","description":"Scratch Blocks is a library for building creative computing interfaces.","fork":false,"url":"https://api.github.com/repos/LLK/scratch-blocks","forks_url":"https://api.github.com/repos/LLK/scratch-blocks/forks","keys_url":"https://api.github.com/repos/LLK/scratch-blocks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LLK/scratch-blocks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LLK/scratch-blocks/teams","hooks_url":"https://api.github.com/repos/LLK/scratch-blocks/hooks","issue_events_url":"https://api.github.com/repos/LLK/scratch-blocks/issues/events{/number}","events_url":"https://api.github.com/repos/LLK/scratch-blocks/events","assignees_url":"https://api.github.com/repos/LLK/scratch-blocks/assignees{/user}","branches_url":"https://api.github.com/repos/LLK/scratch-blocks/branches{/branch}","tags_url":"https://api.github.com/repos/LLK/scratch-blocks/tags","blobs_url":"https://api.github.com/repos/LLK/scratch-blocks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LLK/scratch-blocks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LLK/scratch-blocks/git/refs{/sha}","trees_url":"https://api.github.com/repos/LLK/scratch-blocks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LLK/scratch-blocks/statuses/{sha}","languages_url":"https://api.github.com/repos/LLK/scratch-blocks/languages","stargazers_url":"https://api.github.com/repos/LLK/scratch-blocks/stargazers","contributors_url":"https://api.github.com/repos/LLK/scratch-blocks/contributors","subscribers_url":"https://api.github.com/repos/LLK/scratch-blocks/subscribers","subscription_url":"https://api.github.com/repos/LLK/scratch-blocks/subscription","commits_url":"https://api.github.com/repos/LLK/scratch-blocks/commits{/sha}","git_commits_url":"https://api.github.com/repos/LLK/scratch-blocks/git/commits{/sha}","comments_url":"https://api.github.com/repos/LLK/scratch-blocks/comments{/number}","issue_comment_url":"https://api.github.com/repos/LLK/scratch-blocks/issues/comments{/number}","contents_url":"https://api.github.com/repos/LLK/scratch-blocks/contents/{+path}","compare_url":"https://api.github.com/repos/LLK/scratch-blocks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LLK/scratch-blocks/merges","archive_url":"https://api.github.com/repos/LLK/scratch-blocks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LLK/scratch-blocks/downloads","issues_url":"https://api.github.com/repos/LLK/scratch-blocks/issues{/number}","pulls_url":"https://api.github.com/repos/LLK/scratch-blocks/pulls{/number}","milestones_url":"https://api.github.com/repos/LLK/scratch-blocks/milestones{/number}","notifications_url":"https://api.github.com/repos/LLK/scratch-blocks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LLK/scratch-blocks/labels{/name}","releases_url":"https://api.github.com/repos/LLK/scratch-blocks/releases{/id}","deployments_url":"https://api.github.com/repos/LLK/scratch-blocks/deployments","created_at":"2016-01-07T15:49:10Z","updated_at":"2016-06-13T22:13:49Z","pushed_at":"2016-06-14T20:34:25Z","git_url":"git://github.com/LLK/scratch-blocks.git","ssh_url":"git@github.com:LLK/scratch-blocks.git","clone_url":"https://github.com/LLK/scratch-blocks.git","svn_url":"https://github.com/LLK/scratch-blocks","homepage":"https://scratch.mit.edu/developers","size":54961,"stargazers_count":169,"watchers_count":169,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":84,"forks":28,"open_issues":84,"watchers":169,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/LLK/scratch-blocks/pulls/407"},"html":{"href":"https://github.com/LLK/scratch-blocks/pull/407"},"issue":{"href":"https://api.github.com/repos/LLK/scratch-blocks/issues/407"},"comments":{"href":"https://api.github.com/repos/LLK/scratch-blocks/issues/407/comments"},"review_comments":{"href":"https://api.github.com/repos/LLK/scratch-blocks/pulls/407/comments"},"review_comment":{"href":"https://api.github.com/repos/LLK/scratch-blocks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/LLK/scratch-blocks/pulls/407/commits"},"statuses":{"href":"https://api.github.com/repos/LLK/scratch-blocks/statuses/1b210b4ba86524051d3d77f3e0364eff649367e7"}}}}
{"actor":{"display_login":"tmickel"}}