{"action":"created","comment":{"url":"https://api.github.com/repos/rstudio/shiny/pulls/comments/26681574","id":26681574,"diff_hunk":"@@ -0,0 +1,126 @@\n+#' Create an object representing click options\n+#'\n+#' This generates an object representing click options, to be passed as the\n+#' \\code{click} argument of \\code{\\link{imageOutput}} or\n+#' \\code{\\link{plotOutput}}.\n+#'\n+#' @param id Input value name. For example, if the value is \\code{\"plot_click\"},\n+#'   then the click coordinates will be available as \\code{input$plot_click}.\n+#' @param clip Should the click area be clipped to the plotting area? If FALSE,\n+#'   then the server will receive click events even when the mouse is outside\n+#'   the plotting area, as long as it is still inside the image.\n+#' @export\n+clickOpts <- function(id = NULL, clip = TRUE) {\n+  if (is.null(id))\n+    stop(\"id must not be NULL\")\n+\n+  list(\n+    id = id,\n+    clip = clip\n+  )\n+}\n+\n+\n+#' Create an object representing double-click options\n+#'\n+#' This generates an object representing dobule-click options, to be passed as\n+#' the \\code{dblclick} argument of \\code{\\link{imageOutput}} or\n+#' \\code{\\link{plotOutput}}.\n+#'\n+#' @inheritParams clickOpts\n+#' @param delay Maximum delay (in ms) between a pair clicks for them to be\n+#'   counted as a double-click.\n+#' @export\n+dblclickOpts <- function(id = NULL, clip = TRUE, delay = 400) {\n+  if (is.null(id))\n+    stop(\"id must not be NULL\")\n+\n+  list(\n+    id = id,\n+    clip = clip,\n+    delay = delay\n+  )\n+}\n+\n+#' Create an object representing hover options\n+#'\n+#' This generates an object representing hovering options, to be passed as the\n+#' \\code{hover} argument of \\code{\\link{imageOutput}} or\n+#' \\code{\\link{plotOutput}}.\n+#'\n+#' @param id Input value name. For example, if the value is \\code{\"plot_hover\"},\n+#'   then the hover coordinates will be available as \\code{input$plot_hover}.\n+#' @param delay How long to delay (in milliseconds) when debouncing or\n+#'   throttling, before sending the mouse location to the server.\n+#' @param delayType The type of algorithm for limiting the number of hover\n+#'   events. Use \\code{\"throttle\"} to limit the number of hover events to one\n+#'   every \\code{delay} milliseconds. Use \\code{\"debounce\"} to suspend events\n+#'   while the cursor is moving, and wait until the cursor has been at rest for\n+#'   \\code{delay} milliseconds before sending an event.\n+#' @param clip Should the hover area be clipped to the plotting area? If FALSE,\n+#'   then the server will receive hover events even when the mouse is outside\n+#'   the plotting area, as long as it is still inside the image.\n+#' @export\n+hoverOpts <- function(id = NULL, delay = 300,\n+                         delayType = c(\"debounce\", \"throttle\"), clip = TRUE) {\n+  if (is.null(id))\n+    stop(\"id must not be NULL\")\n+\n+  list(\n+    id = id,\n+    delay = delay,\n+    delayType = match.arg(delayType),\n+    clip = clip\n+  )\n+}\n+\n+#' Create an object representing brushing options\n+#'\n+#' This generates an object representing brushing options, to be passed as the\n+#' \\code{brush} argument of \\code{\\link{imageOutput}} or\n+#' \\code{\\link{plotOutput}}.\n+#'\n+#' @param id Input value name. For example, if the value is \\code{\"plot_brush\"},\n+#'   then the coordinates will be available as \\code{input$plot_brush}.\n+#' @param color Fill color of the brush.\n+#' @param outline Outline color of the brush.\n+#' @param opacity Opacity of the brush\n+#' @param delay How long to delay (in milliseconds) when debouncing or\n+#'   throttling, before sending the brush data to the server.\n+#' @param delayType The type of algorithm for limiting the number of brush\n+#'   events. Use \\code{\"throttle\"} to limit the number of brush events to one\n+#'   every \\code{delay} milliseconds. Use \\code{\"debounce\"} to suspend events\n+#'   while the cursor is moving, and wait until the cursor has been at rest for\n+#'   \\code{delay} milliseconds before sending an event.\n+#' @param clip Should the brush area be clipped to the plotting area? If FALSE,\n+#'   then the user will be able to brush outside the plotting area, as long as\n+#'   it is still inside the image.\n+#' @param direction The direction for brushing. If \\code{\"xy\"}, the brush can be\n+#'   drawn and moved in both x and y directions. If \\code{\"x\"}, or \\code{\"y\"},\n+#'   the brush wil work horizontally or vertically.\n+#' @param resetOnNew When a new image is sent to the browser (via\n+#'   \\code{\\link{renderImage}}), should the brush be reset? The default,\n+#'   \\code{FALSE}, is useful if you want to update the plot while keeping the\n+#'   brush. Using \\code{TRUE} is useful if you want to clear the brush whenever\n+#'   the plot is updated.\n+#' @export\n+brushOpts <- function(id = NULL, color = \"#666\", outline = \"#000\",","path":"R/image-interact-opts.R","position":107,"original_position":107,"commit_id":"30f92914963c1af093e4838eed98992940aaec6d","original_commit_id":"30f92914963c1af093e4838eed98992940aaec6d","user":{"login":"wch","id":86978,"avatar_url":"https://avatars.githubusercontent.com/u/86978?v=3","gravatar_id":"","url":"https://api.github.com/users/wch","html_url":"https://github.com/wch","followers_url":"https://api.github.com/users/wch/followers","following_url":"https://api.github.com/users/wch/following{/other_user}","gists_url":"https://api.github.com/users/wch/gists{/gist_id}","starred_url":"https://api.github.com/users/wch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wch/subscriptions","organizations_url":"https://api.github.com/users/wch/orgs","repos_url":"https://api.github.com/users/wch/repos","events_url":"https://api.github.com/users/wch/events{/privacy}","received_events_url":"https://api.github.com/users/wch/received_events","type":"User","site_admin":false},"body":"Sure, stroke and fill sound good - it's also consistent with ggvis terminology.\r\n\r\nAs for independent opacity of stroke, it's a little tricky since it requires using `rgba()` syntax, and this will require translating from color names to RGB values. Also, IE8 apparently doesn't support `rgba()`, so we'll have to add a workaround for that.","created_at":"2015-03-18T16:43:42Z","updated_at":"2015-03-18T16:43:42Z","html_url":"https://github.com/rstudio/shiny/pull/769#discussion_r26681574","pull_request_url":"https://api.github.com/repos/rstudio/shiny/pulls/769","_links":{"self":{"href":"https://api.github.com/repos/rstudio/shiny/pulls/comments/26681574"},"html":{"href":"https://github.com/rstudio/shiny/pull/769#discussion_r26681574"},"pull_request":{"href":"https://api.github.com/repos/rstudio/shiny/pulls/769"}}},"pull_request":{"url":"https://api.github.com/repos/rstudio/shiny/pulls/769","id":31360032,"html_url":"https://github.com/rstudio/shiny/pull/769","diff_url":"https://github.com/rstudio/shiny/pull/769.diff","patch_url":"https://github.com/rstudio/shiny/pull/769.patch","issue_url":"https://api.github.com/repos/rstudio/shiny/issues/769","number":769,"state":"open","locked":false,"title":"Add more interactions to images","user":{"login":"wch","id":86978,"avatar_url":"https://avatars.githubusercontent.com/u/86978?v=3","gravatar_id":"","url":"https://api.github.com/users/wch","html_url":"https://github.com/wch","followers_url":"https://api.github.com/users/wch/followers","following_url":"https://api.github.com/users/wch/following{/other_user}","gists_url":"https://api.github.com/users/wch/gists{/gist_id}","starred_url":"https://api.github.com/users/wch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wch/subscriptions","organizations_url":"https://api.github.com/users/wch/orgs","repos_url":"https://api.github.com/users/wch/repos","events_url":"https://api.github.com/users/wch/events{/privacy}","received_events_url":"https://api.github.com/users/wch/received_events","type":"User","site_admin":false},"body":"This PR adds support for double-clicking and brushing to plotOutputs. It also adds all four types of mouse interactions (clicking, double-clicking, hovering, brushing) to imageOutputs.\r\n\r\nThere are a couple more features that would be useful in the future, but I'd like to get this branch merged first because it's already huge. The other features are:\r\n\r\n* Handles for resizing brush\r\n* ggplot2 support\r\n\r\nDemo app: https://winston.shinyapps.io/interactive_graphic/\r\nSource: https://gist.github.com/wch/bf20e5b86f06b1d968e2","created_at":"2015-03-17T17:48:29Z","updated_at":"2015-03-18T16:43:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rstudio/shiny/pulls/769/commits","review_comments_url":"https://api.github.com/repos/rstudio/shiny/pulls/769/comments","review_comment_url":"https://api.github.com/repos/rstudio/shiny/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rstudio/shiny/issues/769/comments","statuses_url":"https://api.github.com/repos/rstudio/shiny/statuses/30f92914963c1af093e4838eed98992940aaec6d","head":{"label":"rstudio:interactive-graphic","ref":"interactive-graphic","sha":"30f92914963c1af093e4838eed98992940aaec6d","user":{"login":"rstudio","id":513560,"avatar_url":"https://avatars.githubusercontent.com/u/513560?v=3","gravatar_id":"","url":"https://api.github.com/users/rstudio","html_url":"https://github.com/rstudio","followers_url":"https://api.github.com/users/rstudio/followers","following_url":"https://api.github.com/users/rstudio/following{/other_user}","gists_url":"https://api.github.com/users/rstudio/gists{/gist_id}","starred_url":"https://api.github.com/users/rstudio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rstudio/subscriptions","organizations_url":"https://api.github.com/users/rstudio/orgs","repos_url":"https://api.github.com/users/rstudio/repos","events_url":"https://api.github.com/users/rstudio/events{/privacy}","received_events_url":"https://api.github.com/users/rstudio/received_events","type":"Organization","site_admin":false},"repo":{"id":4729944,"name":"shiny","full_name":"rstudio/shiny","owner":{"login":"rstudio","id":513560,"avatar_url":"https://avatars.githubusercontent.com/u/513560?v=3","gravatar_id":"","url":"https://api.github.com/users/rstudio","html_url":"https://github.com/rstudio","followers_url":"https://api.github.com/users/rstudio/followers","following_url":"https://api.github.com/users/rstudio/following{/other_user}","gists_url":"https://api.github.com/users/rstudio/gists{/gist_id}","starred_url":"https://api.github.com/users/rstudio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rstudio/subscriptions","organizations_url":"https://api.github.com/users/rstudio/orgs","repos_url":"https://api.github.com/users/rstudio/repos","events_url":"https://api.github.com/users/rstudio/events{/privacy}","received_events_url":"https://api.github.com/users/rstudio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rstudio/shiny","description":"Easy interactive web applications with R","fork":false,"url":"https://api.github.com/repos/rstudio/shiny","forks_url":"https://api.github.com/repos/rstudio/shiny/forks","keys_url":"https://api.github.com/repos/rstudio/shiny/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rstudio/shiny/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rstudio/shiny/teams","hooks_url":"https://api.github.com/repos/rstudio/shiny/hooks","issue_events_url":"https://api.github.com/repos/rstudio/shiny/issues/events{/number}","events_url":"https://api.github.com/repos/rstudio/shiny/events","assignees_url":"https://api.github.com/repos/rstudio/shiny/assignees{/user}","branches_url":"https://api.github.com/repos/rstudio/shiny/branches{/branch}","tags_url":"https://api.github.com/repos/rstudio/shiny/tags","blobs_url":"https://api.github.com/repos/rstudio/shiny/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rstudio/shiny/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rstudio/shiny/git/refs{/sha}","trees_url":"https://api.github.com/repos/rstudio/shiny/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rstudio/shiny/statuses/{sha}","languages_url":"https://api.github.com/repos/rstudio/shiny/languages","stargazers_url":"https://api.github.com/repos/rstudio/shiny/stargazers","contributors_url":"https://api.github.com/repos/rstudio/shiny/contributors","subscribers_url":"https://api.github.com/repos/rstudio/shiny/subscribers","subscription_url":"https://api.github.com/repos/rstudio/shiny/subscription","commits_url":"https://api.github.com/repos/rstudio/shiny/commits{/sha}","git_commits_url":"https://api.github.com/repos/rstudio/shiny/git/commits{/sha}","comments_url":"https://api.github.com/repos/rstudio/shiny/comments{/number}","issue_comment_url":"https://api.github.com/repos/rstudio/shiny/issues/comments{/number}","contents_url":"https://api.github.com/repos/rstudio/shiny/contents/{+path}","compare_url":"https://api.github.com/repos/rstudio/shiny/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rstudio/shiny/merges","archive_url":"https://api.github.com/repos/rstudio/shiny/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rstudio/shiny/downloads","issues_url":"https://api.github.com/repos/rstudio/shiny/issues{/number}","pulls_url":"https://api.github.com/repos/rstudio/shiny/pulls{/number}","milestones_url":"https://api.github.com/repos/rstudio/shiny/milestones{/number}","notifications_url":"https://api.github.com/repos/rstudio/shiny/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rstudio/shiny/labels{/name}","releases_url":"https://api.github.com/repos/rstudio/shiny/releases{/id}","created_at":"2012-06-20T18:45:11Z","updated_at":"2015-03-18T15:18:34Z","pushed_at":"2015-03-17T18:08:07Z","git_url":"git://github.com/rstudio/shiny.git","ssh_url":"git@github.com:rstudio/shiny.git","clone_url":"https://github.com/rstudio/shiny.git","svn_url":"https://github.com/rstudio/shiny","homepage":"http://shiny.rstudio.com","size":15175,"stargazers_count":1081,"watchers_count":1081,"language":"R","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":510,"mirror_url":null,"open_issues_count":95,"forks":510,"open_issues":95,"watchers":1081,"default_branch":"master"}},"base":{"label":"rstudio:master","ref":"master","sha":"dcb300ab50240ac32da29921badbee8e4f99cb9c","user":{"login":"rstudio","id":513560,"avatar_url":"https://avatars.githubusercontent.com/u/513560?v=3","gravatar_id":"","url":"https://api.github.com/users/rstudio","html_url":"https://github.com/rstudio","followers_url":"https://api.github.com/users/rstudio/followers","following_url":"https://api.github.com/users/rstudio/following{/other_user}","gists_url":"https://api.github.com/users/rstudio/gists{/gist_id}","starred_url":"https://api.github.com/users/rstudio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rstudio/subscriptions","organizations_url":"https://api.github.com/users/rstudio/orgs","repos_url":"https://api.github.com/users/rstudio/repos","events_url":"https://api.github.com/users/rstudio/events{/privacy}","received_events_url":"https://api.github.com/users/rstudio/received_events","type":"Organization","site_admin":false},"repo":{"id":4729944,"name":"shiny","full_name":"rstudio/shiny","owner":{"login":"rstudio","id":513560,"avatar_url":"https://avatars.githubusercontent.com/u/513560?v=3","gravatar_id":"","url":"https://api.github.com/users/rstudio","html_url":"https://github.com/rstudio","followers_url":"https://api.github.com/users/rstudio/followers","following_url":"https://api.github.com/users/rstudio/following{/other_user}","gists_url":"https://api.github.com/users/rstudio/gists{/gist_id}","starred_url":"https://api.github.com/users/rstudio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rstudio/subscriptions","organizations_url":"https://api.github.com/users/rstudio/orgs","repos_url":"https://api.github.com/users/rstudio/repos","events_url":"https://api.github.com/users/rstudio/events{/privacy}","received_events_url":"https://api.github.com/users/rstudio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rstudio/shiny","description":"Easy interactive web applications with R","fork":false,"url":"https://api.github.com/repos/rstudio/shiny","forks_url":"https://api.github.com/repos/rstudio/shiny/forks","keys_url":"https://api.github.com/repos/rstudio/shiny/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rstudio/shiny/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rstudio/shiny/teams","hooks_url":"https://api.github.com/repos/rstudio/shiny/hooks","issue_events_url":"https://api.github.com/repos/rstudio/shiny/issues/events{/number}","events_url":"https://api.github.com/repos/rstudio/shiny/events","assignees_url":"https://api.github.com/repos/rstudio/shiny/assignees{/user}","branches_url":"https://api.github.com/repos/rstudio/shiny/branches{/branch}","tags_url":"https://api.github.com/repos/rstudio/shiny/tags","blobs_url":"https://api.github.com/repos/rstudio/shiny/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rstudio/shiny/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rstudio/shiny/git/refs{/sha}","trees_url":"https://api.github.com/repos/rstudio/shiny/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rstudio/shiny/statuses/{sha}","languages_url":"https://api.github.com/repos/rstudio/shiny/languages","stargazers_url":"https://api.github.com/repos/rstudio/shiny/stargazers","contributors_url":"https://api.github.com/repos/rstudio/shiny/contributors","subscribers_url":"https://api.github.com/repos/rstudio/shiny/subscribers","subscription_url":"https://api.github.com/repos/rstudio/shiny/subscription","commits_url":"https://api.github.com/repos/rstudio/shiny/commits{/sha}","git_commits_url":"https://api.github.com/repos/rstudio/shiny/git/commits{/sha}","comments_url":"https://api.github.com/repos/rstudio/shiny/comments{/number}","issue_comment_url":"https://api.github.com/repos/rstudio/shiny/issues/comments{/number}","contents_url":"https://api.github.com/repos/rstudio/shiny/contents/{+path}","compare_url":"https://api.github.com/repos/rstudio/shiny/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rstudio/shiny/merges","archive_url":"https://api.github.com/repos/rstudio/shiny/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rstudio/shiny/downloads","issues_url":"https://api.github.com/repos/rstudio/shiny/issues{/number}","pulls_url":"https://api.github.com/repos/rstudio/shiny/pulls{/number}","milestones_url":"https://api.github.com/repos/rstudio/shiny/milestones{/number}","notifications_url":"https://api.github.com/repos/rstudio/shiny/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rstudio/shiny/labels{/name}","releases_url":"https://api.github.com/repos/rstudio/shiny/releases{/id}","created_at":"2012-06-20T18:45:11Z","updated_at":"2015-03-18T15:18:34Z","pushed_at":"2015-03-17T18:08:07Z","git_url":"git://github.com/rstudio/shiny.git","ssh_url":"git@github.com:rstudio/shiny.git","clone_url":"https://github.com/rstudio/shiny.git","svn_url":"https://github.com/rstudio/shiny","homepage":"http://shiny.rstudio.com","size":15175,"stargazers_count":1081,"watchers_count":1081,"language":"R","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":510,"mirror_url":null,"open_issues_count":95,"forks":510,"open_issues":95,"watchers":1081,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rstudio/shiny/pulls/769"},"html":{"href":"https://github.com/rstudio/shiny/pull/769"},"issue":{"href":"https://api.github.com/repos/rstudio/shiny/issues/769"},"comments":{"href":"https://api.github.com/repos/rstudio/shiny/issues/769/comments"},"review_comments":{"href":"https://api.github.com/repos/rstudio/shiny/pulls/769/comments"},"review_comment":{"href":"https://api.github.com/repos/rstudio/shiny/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rstudio/shiny/pulls/769/commits"},"statuses":{"href":"https://api.github.com/repos/rstudio/shiny/statuses/30f92914963c1af093e4838eed98992940aaec6d"}}}}