Skip to content

Commit

Permalink
Fix #344
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasp85 committed Jan 12, 2024
1 parent 84262db commit fa1f6b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* Updated guides to the new ggplot2 interface. For `guide_edge_direction()`,
this update adds the option to use labels instead of an arrow using the
`labels` argument.
* `create_layout()` now returns a modified tibble rather than a data.frame

# ggraph 2.1.0

Expand Down
3 changes: 2 additions & 1 deletion R/tbl_graph.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ create_layout.tbl_graph <- function(graph, layout, circular = FALSE, ...) {
} else {
layout <- layout_to_table(layout, graph, circular = circular, ...)
}
layout <- as_tibble(layout)
layout$.ggraph.index <- seq_len(nrow(layout))
if (is.null(attr(layout, 'graph'))) {
attr(layout, 'graph') <- graph
Expand All @@ -21,7 +22,7 @@ create_layout.tbl_graph <- function(graph, layout, circular = FALSE, ...) {
class(layout) <- c(
'layout_tbl_graph',
'layout_ggraph',
'data.frame'
class(layout)
)
check_layout(layout)
}
Expand Down

0 comments on commit fa1f6b0

Please sign in to comment.