Skip to content

Commit 11490e5

Browse files
committed
fix: label_interactive was broken by the new V4 ggplot2
see #348
1 parent b7e58a5 commit 11490e5

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
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.4
4+
Version: 0.9.5.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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# ggiraph 0.9.5
2+
3+
## Issues
4+
5+
- fix label_interactive broken by the new V4 ggplot2 (#348)
6+
17
# ggiraph 0.9.4
28

39
- toolbar gains new button "fullscreen".

R/element_interactive.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,11 @@ element_interactive <- function(
5959
# By setting them as an attribute they are preserved.
6060
attr(struct, "interactive") <- ip
6161
attr(struct, "ipar") <- ipar
62+
# Strip namespace prefix from S7 class name
63+
# (e.g. "ggplot2::element_text" -> "element_text")
64+
base_class <- sub("^.*::", "", class(struct)[1])
6265
class(struct) <- c(
63-
paste("interactive", class(struct)[1], sep = "_"),
66+
paste("interactive", base_class, sep = "_"),
6467
"interactive_element",
6568
class(struct)
6669
)

0 commit comments

Comments
 (0)