Permalink
Browse files

Merge pull request #686 from jrnold/fix/elements-class

put subclass first for class attributes of subclasses of element
  • Loading branch information...
2 parents 97ce413 + fda57cb commit 5761df9487a2b941d53613a28671aec52630d6c1 @wch wch committed Oct 11, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 R/theme-elements.r
View
@@ -5,7 +5,7 @@
element_blank <- function() {
structure(
list(),
- class = c("element", "element_blank")
+ class = c("element_blank", "element")
)
}
@@ -25,7 +25,7 @@ element_rect <- function(fill = NULL, colour = NULL, size = NULL,
if (!is.null(color)) colour <- color
structure(
list(fill = fill, colour = colour, size = size, linetype = linetype),
- class = c("element", "element_rect")
+ class = c("element_rect", "element")
)
}
@@ -43,7 +43,7 @@ element_line <- function(colour = NULL, size = NULL, linetype = NULL,
if (!is.null(color)) colour <- color
structure(
list(colour = colour, size = size, linetype = linetype, lineend = lineend),
- class = c("element", "element_line")
+ class = c("element_line", "element")
)
}
@@ -68,7 +68,7 @@ element_text <- function(family = NULL, face = NULL, colour = NULL,
structure(
list(family = family, face = face, colour = colour, size = size,
hjust = hjust, vjust = vjust, angle = angle, lineheight = lineheight),
- class = c("element", "element_text")
+ class = c("element_text", "element")
)
}

0 comments on commit 5761df9

Please sign in to comment.