Skip to content

Commit

Permalink
fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
jokergoo committed Jul 5, 2020
1 parent 005624c commit cefc232
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions R/HeatmapList-legends.R
Original file line number Diff line number Diff line change
Expand Up @@ -405,21 +405,42 @@ calc_ht_w = function(ht_list, include_right = FALSE) {
}

calc_before_h = function(ht_list) {
sum(component_height(ht_list@ht_list[[ which_first_ht(ht_list) ]], 1:4))
i = which_last_ht(ht_list)
if(i > 1) {
unit(0, "mm")
} else {
sum(component_height(ht_list@ht_list[[ which_last_ht(ht_list) ]], 6:9))
}
}

calc_after_h = function(ht_list) {
sum(component_height(ht_list@ht_list[[ which_last_ht(ht_list) ]], 6:9))
i = which_last_ht(ht_list)
if(i < length(ht_list@ht_list)) {
unit(0, "mm")
} else {
sum(component_height(ht_list@ht_list[[ which_last_ht(ht_list) ]], 6:9))
}
}

calc_before_w = function(ht_list) {
sum(component_width(ht_list@ht_list[[ which_first_ht(ht_list) ]], 1:4))
i = which_last_ht(ht_list)
if(i > 1) {
unit(0, "mm")
} else {
sum(component_width(ht_list@ht_list[[ which_first_ht(ht_list) ]], 1:4))
}
}

calc_after_w = function(ht_list) {
sum(component_width(ht_list@ht_list[[ which_last_ht(ht_list) ]], 6:9))
i = which_last_ht(ht_list)
if(i < length(ht_list@ht_list)) {
unit(0, "mm")
} else {
sum(component_width(ht_list@ht_list[[ which_last_ht(ht_list) ]], 6:9))
}
}


guess_align_legend = function(ht_list,
heatmap_legend_size, annotation_legend_size,
heatmap_legend_side, annotation_legend_side,
Expand Down

0 comments on commit cefc232

Please sign in to comment.