@@ -329,6 +329,45 @@ rel <- function(x) {
329
329
structure(x , class = " rel" )
330
330
}
331
331
332
+ # ' @export
333
+ `$.ggplot2::element` <- function (x , i ) {
334
+ # deprecate_soft0("4.0.0", I("`<ggplot2::element>$i`"), I("`<ggplot2::element>@i`"))
335
+ `[[`(S7 :: props(x ), i )
336
+ }
337
+
338
+ # ' @export
339
+ `[.ggplot2::element` <- function (x , i ) {
340
+ # deprecate_soft0("4.0.0", I("`<gglot2::element>[i]`"), I("`S7::props(<ggplot2::element>, i)`"))
341
+ `[`(S7 :: props(x ), i )
342
+ }
343
+
344
+ # ' @export
345
+ `[[.ggplot2::element` <- function (x , i ) {
346
+ # deprecate_soft0("4.0.0", I("`<ggplot2::element>[[i]]`"), I("`S7::prop(<ggplot2::element>, i)`"))
347
+ `[[`(S7 :: props(x ), i )
348
+ }
349
+
350
+ # ' @export
351
+ `$<-.ggplot2::element` <- function (x , i , value ) {
352
+ # deprecate_soft0("4.0.0", I("`<ggplot2::element>$i <- value`"), I("`<ggplot2::element>@i <- value`"))
353
+ S7 :: props(x ) <- `[[<-`(S7 :: props(x ), i , value )
354
+ x
355
+ }
356
+
357
+ # ' @export
358
+ `[<-.ggplot2::element` <- function (x , i , value ) {
359
+ # deprecate_soft0("4.0.0", I("`<ggplot2::element>[i] <- value`"), I("`S7::props(<ggplot2::element>)[i] <- value`"))
360
+ S7 :: props(x ) <- `[<-`(S7 :: props(x ), i , value )
361
+ x
362
+ }
363
+
364
+ # ' @export
365
+ `[[<-.ggplot2::element` <- function (x , i , value ) {
366
+ # deprecate_soft0("4.0.0", I("`<ggplot2::element>[[i]] <- value`"), I("S7::prop(<ggplot2::element>, i) <- value"))
367
+ S7 :: props(x ) <- `[[<-`(S7 :: props(x ), i , value )
368
+ x
369
+ }
370
+
332
371
# ' @export
333
372
print.rel <- function (x , ... ) print(noquote(paste(x , " *" , sep = " " )))
334
373
0 commit comments