... |
... |
@@ -1085,7 +1085,10 @@ setMethod(f = "re_size",
|
1085 |
1085 |
} else {
|
1086 |
1086 |
if(length(annotation_height) == 1) {
|
1087 |
1087 |
if(length(object@anno_list) > 1) {
|
1088 |
|
- warning_wrap("`annotation_height` is set with length of one while with multiplt annotations, `annotation_height` is treated as `height`.")
|
|
1088 |
+ warning_wrap("`annotation_height` is set with length of one while with multiple annotations, `annotation_height` is treated as `height`.")
|
|
1089 |
+ }
|
|
1090 |
+ if(length(object@anno_list) == 1 && !inherits(annotation_height, "unit")) {
|
|
1091 |
+ stop_wrap("When there is only one annotation, `annotation_height` should be set as a unit object.")
|
1089 |
1092 |
}
|
1090 |
1093 |
height = annotation_height[1]
|
1091 |
1094 |
if(!inherits(height, "unit")) {
|
... |
... |
@@ -1120,7 +1123,10 @@ setMethod(f = "re_size",
|
1120 |
1123 |
} else {
|
1121 |
1124 |
if(length(annotation_width) == 1) {
|
1122 |
1125 |
if(length(object@anno_list) > 1) {
|
1123 |
|
- warning_wrap("`annotation_width` is set with length of one while with multiplt annotations, `annotation_width` is treated as `width`.")
|
|
1126 |
+ warning_wrap("`annotation_width` is set with length of one while with multiple annotations, `annotation_width` is treated as `width`.")
|
|
1127 |
+ }
|
|
1128 |
+ if(length(object@anno_list) == 1 && !inherits(annotation_width, "unit")) {
|
|
1129 |
+ stop_wrap("When there is only one annotation, `annotation_width` should be set as a unit object.")
|
1124 |
1130 |
}
|
1125 |
1131 |
width = annotation_width[1]
|
1126 |
1132 |
if(!inherits(width, "unit")) {
|