Skip to content

Commit 5d61202

Browse files
committed
Merge pull request #261 from ropensci/fix-text-with-size-parameter
if user supplied text, don't auto-fill text attribute with size info
2 parents 897a446 + 4bff09f commit 5d61202

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.travis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ script:
2020

2121
after_success:
2222
- cd ../plotly-test-table
23-
- ls -R
2423
- Rscript ../plotly/inst/build-push-comment.R
2524

2625
env:

R/trace_generation.R

+3-1
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,9 @@ geom2trace <- list(
541541
mode="markers",
542542
marker=paramORdefault(params, aes2marker, marker.defaults))
543543
if("size" %in% names(data)){
544-
L$text <- paste("size:", data$size)
544+
if(!("text" %in% names(data))) {
545+
L$text <- paste("size:", data$size)
546+
}
545547
L$marker$sizeref <- default.marker.sizeref
546548
# Make sure sizes are passed as a list even when there is only one element.
547549
s <- data$size

inst/build-push-comment.R

+5-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,11 @@ if (tpr != "false" && tpr != "") {
5454
base_pngs <- dir(base_dir, pattern = "\\.png$")
5555
# Re-run (current) test suite with master branch if it's missing any tests
5656
if (!all(this_pngs %in% base_pngs)) {
57+
cat(base_hash, file = "base_hash.txt")
5758
dir.create(base_dir, showWarnings = FALSE)
58-
devtools::install_github("ropensci/plotly", ref = base_hash)
59+
system2("Rscript",
60+
c("-e", shQuote("devtools::install_github('ropensci/plotly', ref = readLines('base_hash.txt'))"))
61+
)
5962
print("Rerunning tests with master")
6063
try(source("../plotly/tests/testthat.R", chdir = TRUE))
6164
}
@@ -107,7 +110,7 @@ if (tpr != "false" && tpr != "") {
107110
# strip any leading/trailing whitespace in urls
108111
hashes$url <- sub("\\s$", "", sub("^\\s", "", hashes$url))
109112
hashes <- hashes[hashes$commit %in% c(this_hash, base_hash), ]
110-
devtools::install("../plotly")
113+
system("R CMD INSTALL ../plotly")
111114
diffs <- character()
112115
for (i in tests) {
113116
test_info <- hashes[hashes$test %in% i, ]

0 commit comments

Comments
 (0)