Skip to content

Commit 74b9168

Browse files
committed
moar braces
1 parent b6de355 commit 74b9168

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/ggplotly.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ gg2list <- function(p, width = NULL, height = NULL,
566566
)
567567
# allocate enough space for the _longest_ text label
568568
axisTextX <- theme[["axis.text.x"]] %||% theme[["axis.text"]]
569-
labz <- unlist(lapply(layout$panel_params, function(pp) pp[["x"]]$get_labels %()% pp$x.labels))
569+
labz <- unlist(lapply(layout$panel_params, function(pp) { pp[["x"]]$get_labels %()% pp$x.labels }))
570570
lab <- labz[which.max(nchar(labz))]
571571
panelMarginY <- panelMarginY + axisTicksX +
572572
bbox(lab, axisTextX$angle, unitConvert(axisTextX, "npc", "height"))[["height"]]
@@ -578,7 +578,7 @@ gg2list <- function(p, width = NULL, height = NULL,
578578
)
579579
# allocate enough space for the _longest_ text label
580580
axisTextY <- theme[["axis.text.y"]] %||% theme[["axis.text"]]
581-
labz <- unlist(lapply(layout$panel_params, function(pp) pp[["y"]]$get_labels %()% pp$y.labels))
581+
labz <- unlist(lapply(layout$panel_params, function(pp) { pp[["y"]]$get_labels %()% pp$y.labels }))
582582
lab <- labz[which.max(nchar(labz))]
583583
panelMarginX <- panelMarginX + axisTicksY +
584584
bbox(lab, axisTextY$angle, unitConvert(axisTextY, "npc", "width"))[["width"]]

0 commit comments

Comments
 (0)