Skip to content

Commit f8b8427

Browse files
committed
don't consider mesh3d's data arrays for training
1 parent eea7af9 commit f8b8427

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

R/plotly_build.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ plotly_build.plotly <- function(p) {
9797
isArray <- lapply(Attrs, function(x) {
9898
tryCatch(identical(x[["valType"]], "data_array"), error = function(e) FALSE)
9999
})
100-
dataArrayAttrs <- names(Attrs)[as.logical(isArray)]
100+
# I don't think we ever want mesh3d's data attrs
101+
dataArrayAttrs <- if (identical(trace[["type"]], "mesh3d")) NULL else names(Attrs)[as.logical(isArray)]
101102
# for some reason, text isn't listed as a data array attributein some traces
102103
# I'm looking at you scattergeo...
103104
tr <- trace[names(trace) %in% c(npscales(), special_attrs(trace), dataArrayAttrs, "text")]

inst/htmlwidgets/plotly.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ HTMLWidgets.widget({
99
// open in chrome, right-click on console output: "save-as" -> "schema.json"
1010
// Schema <- jsonlite::fromJSON("~/Downloads/schema.json")
1111
// devtools::use_data(Schema, overwrite = T)
12-
console.log(JSON.stringify(Plotly.PlotSchema.get()));
12+
// console.log(JSON.stringify(Plotly.PlotSchema.get()));
1313
return {};
1414
},
1515

0 commit comments

Comments
 (0)