Skip to content

Commit 68d3a65

Browse files
committed
feat: toolbar gains new button "fullscreen".
1 parent a4fd75d commit 68d3a65

File tree

12 files changed

+210
-12
lines changed

12 files changed

+210
-12
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: ggiraph
33
Title: Make 'ggplot2' Graphics Interactive
4-
Version: 0.9.3
4+
Version: 0.9.4.001
55
Authors@R: c(
66
person("David", "Gohel", , "david.gohel@ardata.fr", role = c("aut", "cre")),
77
person("Panagiotis", "Skintzos", , "sigmapi@posteo.net", role = "aut"),

NEWS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# ggiraph 0.9.4
2+
3+
- toolbar gains new button "fullscreen".
4+
5+
16
# ggiraph 0.9.3
27

38
## Change

R/girafe_options.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ opts_tooltip <- function(
6060
delay_mouseover = 200,
6161
delay_mouseout = 500,
6262
placement = c("auto", "doc", "container"),
63-
zindex = 999
63+
zindex = 9999
6464
) {
6565
css <- check_css(
6666
css = css,
@@ -494,7 +494,8 @@ opts_zoom <- function(min = 1, max = 1, duration = 300, default_on = FALSE) {
494494
#' zoom_off = 'deactivate pan/zoom',
495495
#' zoom_rect = 'zoom with rectangle',
496496
#' zoom_reset = 'reset pan/zoom',
497-
#' saveaspng = 'download png'
497+
#' saveaspng = 'download png',
498+
#' fullscreen = 'fullscreen'
498499
#' )
499500
#' @param fixed if FALSE (default), the toolbar will float above the graphic, if
500501
#' TRUE, the toolbar will be fixed and always visible.
@@ -503,7 +504,7 @@ opts_zoom <- function(min = 1, max = 1, duration = 300, default_on = FALSE) {
503504
#'
504505
#' Valid button groups: 'selection', 'zoom', 'misc'
505506
#'
506-
#' Valid button names: 'lasso_select', 'lasso_deselect', 'zoom_onoff', 'zoom_rect', 'zoom_reset', 'saveaspng'
507+
#' Valid button names: 'lasso_select', 'lasso_deselect', 'zoom_onoff', 'zoom_rect', 'zoom_reset', 'saveaspng', 'fullscreen'
507508
#'
508509
#' @note
509510
#' `saveaspng` relies on JavaScript promises, so any browsers that don't natively

inst/htmlwidgets/girafe.css

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,47 @@
149149
.ggiraph-svg .ggiraph-svg-rootg [id] {
150150
pointer-events: all;
151151
}
152+
153+
/* fullscreen modal styles */
154+
.ggiraph-fullscreen-modal {
155+
position: fixed;
156+
inset: 0;
157+
background-color: rgba(0, 0, 0, 0.85);
158+
display: flex;
159+
align-items: center;
160+
justify-content: center;
161+
}
162+
163+
.ggiraph-fullscreen-content {
164+
position: relative;
165+
height: 90vw;
166+
max-height: 90vh;
167+
background-color: white;
168+
border-radius: 8px;
169+
padding: 20px;
170+
display: flex;
171+
align-items: center;
172+
justify-content: center;
173+
}
174+
175+
.ggiraph-fullscreen-close {
176+
position: absolute;
177+
top: 10px;
178+
right: 10px;
179+
width: 32px;
180+
height: 32px;
181+
border: none;
182+
background: #f0f0f0;
183+
border-radius: 50%;
184+
cursor: pointer;
185+
font-size: 20px;
186+
line-height: 1;
187+
display: flex;
188+
align-items: center;
189+
justify-content: center;
190+
}
191+
192+
.ggiraph-fullscreen-close:hover {
193+
background-color: #e30c37;
194+
color: white;
195+
}

inst/htmlwidgets/girafe.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

inst/htmlwidgets/girafe.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
dependencies:
22
- name: ggiraphjs
3-
version: 0.9.2
3+
version: 0.9.4
44
src: htmlwidgets
55
script: girafe.js
66
stylesheet: girafe.css

man/opts_toolbar.Rd

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/opts_tooltip.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ggiraphjs",
3-
"version": "0.9.2",
3+
"version": "0.9.4",
44
"main": "index.js",
55
"scripts": {
66
"test": "echo \"Error: no test specified\" && exit 1",

srcjs/modules/factory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export function factory(shinyMode) {
6161

6262
ggobj.setupZoom(x.settings.zoom, x.settings.toolbar.tooltips);
6363

64-
ggobj.setupToolbar(x.settings.toolbar);
64+
ggobj.setupToolbar(x.settings.toolbar, x.settings.tooltip.zindex);
6565

6666
ggobj.setupTooltip(x.settings.tooltip);
6767

0 commit comments

Comments
 (0)