Skip to content

Commit fe0e5c6

Browse files
committed
Reinstate layer print method. Closes #1172
1 parent 13249d8 commit fe0e5c6

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

R/layer.r

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,14 @@ Layer <- proto2("Layer", NULL,
6262
aesthetics[!set & !calculated]
6363
},
6464

65-
# print = function(self) {
66-
# if (is.null(self$geom)) {
67-
# cat("Empty layer\n")
68-
# return(invisible());
69-
# }
70-
# if (!is.null(self$mapping)) {
71-
# cat("mapping:", clist(self$mapping), "\n")
72-
# }
73-
# self$geom$print(newline=FALSE)
74-
# cat(clist(self$geom_params), "\n")
75-
# self$stat$print(newline=FALSE)
76-
# cat(clist(self$stat_params), "\n")
77-
# self$position$print()
78-
# },
65+
print = function(self) {
66+
if (!is.null(self$mapping)) {
67+
cat("mapping:", clist(self$mapping), "\n")
68+
}
69+
cat(snakeize(class(self$geom)[[1]]), ": ", clist(self$geom_params), "\n", sep = "")
70+
cat(snakeize(class(self$stat)[[1]]), ": ", clist(self$stat_params), "\n", sep = "")
71+
cat(snakeize(class(self$position)[[1]]), "\n")
72+
},
7973

8074

8175
compute_aesthetics = function(self, data, plot) {

0 commit comments

Comments
 (0)